You offered me some help on using Excel objects, and I wanted to ask you more... could you possibly email me?
[email protected]
Cheers!
Printable View
You offered me some help on using Excel objects, and I wanted to ask you more... could you possibly email me?
[email protected]
Cheers!
Are you there?
I'm sorry, I didn't go back to the post and check it again. Here is some code that will insert data into an EXCEL cell. By the way, this is part of my first VB application. The sheriff's department is still using that application to move raw data from it's dispatch system, to EXCEL to track crime statistics. Good luck.
Private xlOut As Excel.Application
Set xlOut = CreateObject("Excel.Application")
' You put in path and file name.
xlOut.Workbooks.Open xlOutPath & xlOutFileName & ".xls"
' If you want to see it, uncomment.
'xlOut.Visible = True
' You put in the name of the worksheet,
xlOut.Worksheets(xlOutWorkSheetName).Activate
' and the row and column.
xlOut.Worksheets(xlOutWorkSheetName).Cells(intOutRow, intOutColumn) = Data
xlOut.ActiveWorkbook.Close SaveChanges:=True
Set xlOut = Nothing
xlOut.Quit
Cheers HDF, I'll let you know how I get on with it.
By the way, will this work with an inserted excel worksheet? I was trying to do it by adding it to the toolbox from the Insertable Objects tab, and then painting it on to a form. But I couldn't figure out how to get the normal excel properties to work with that.
Thanks a lot anyway!