View Single Post
  #3  
Old 08-05-2004, 09:05 PM
pyang pyang is online now
Registered User
 
Join Date: 12-23-2003
Posts: 33
I'm not very sure. About the COM interface.

I've tried the following it is not showing any value?
Pls advice. Thank you.
--------------------------------------------------------------------------------
Dim xlApp
Dim xlBook
Dim xlSheet

' set reference to Application object
Set xlApp = CreateObject("Excel.Application")

' set reference to Workbook object
Set xlBook = xlApp.Workbooks.Open("C:\test.xls")

' set the reference to Worksheet for Common
Set xlSheet = xlBook.WorkSheets(1)

xlSheet.Range(%SRC_ROW%:%SRC_COL%).Value = %SOURCE_LOC%
msgbox(%SOURCE_LOC%), VBOK, "Test"

' close Excel and destroy object variables
xlApp.Quit
Set xlSheet = Nothing
Set xlBook = Nothing
Set xlApp = Nothing

--------------------------------------------------------------------------------
Reply With Quote