|
-
Mar 20th, 2000, 06:27 PM
#1
Thread Starter
Fanatic Member
You offered me some help on using Excel objects, and I wanted to ask you more... could you possibly email me?
[email protected]
Cheers!
-
Mar 21st, 2000, 02:01 AM
#2
Thread Starter
Fanatic Member
-
Mar 21st, 2000, 02:33 AM
#3
Addicted Member
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
-
Mar 21st, 2000, 04:45 AM
#4
Thread Starter
Fanatic Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|