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?