I have some code to import from an excel spreadsheet into a notes database. The code runs ok. Only problem I’m having is that after I run the code I can’t open the spreadsheet to trouble shoot. I can run the code over and over again. But if I try to just open the spreadsheet nothing will happen. I to reboot the pc to release the file. There must be something I’m omitting in the code. Here’s where I open the file followed by some dots and then how it ends:
Set xlApp = CreateObject(“Excel.application”)
xlApp.Visible = False
'file = xlApp.GetOpenFilename("Microsoft Excel Files (*.xls),*.xls",, "Import File",, False)
file = "C:\Documents And Settings\morriskh\My Documents\GlobalPNSlurryImportExport\SlurryImportExport.xls"
Call xlApp.Workbooks.Open(file, 0, True)
…
xlapp.activeworkbook.close
Set xlapp = Nothing
Messagebox( " Import Finished ")