I am attempting to open an excel workbook from access but excel is continually crashing. I have no problems opening workbooks outside of access so i'm assuming its the code thats messing it up.
Static wbWorkbook As Excel.Workbook
Set wbWorkbook = GetObject("C:\My Documents\MyFile.xls")
wbWorkbook.Application.Visible = True
wbWorkbook.Parent.Windows(1).Visible = True
Can anyone please suggest the proper way to use the GetObject function to simply open a workbook?
Static wbWorkbook As Excel.Workbook
Set wbWorkbook = GetObject("C:\My Documents\MyFile.xls")
wbWorkbook.Application.Visible = True
wbWorkbook.Parent.Windows(1).Visible = True
Can anyone please suggest the proper way to use the GetObject function to simply open a workbook?