|
-
May 1st, 2001, 12:30 AM
#1
Excel and VB
Hi,
I need to call Excel Application from my VB Code, Update it, then wait for the user to close it. This is how I have started my application, and written to the sheet.
Dim xlApp As Excel.Application
Dim xlBook As Workbook
Dim xlSheet As Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open ("d:logidule\cap_road.xls")
Set xlSheet = xlBook.Worksheets(1)
xlSheet.Cells(5, 4) = "S05" 'Write to cell
xlApp.Application.Visible = True
xlApp.Parent.Windows(1).Visible = True
xlApp.DisplayAlerts = False
' Here I want to wait for the user to close Excel 'Application
xlBook.Close
xlApp.Quit
Set xlSheet = Nothing
Set xlBook = Nothing
Set xlApp = Nothing
I want to wait for the user to Close Excel Application ( as given in comments ). How do I accomplish it?
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
|