I've been searching for an answer, but nothing I have found works for me...
The problem I'm having is that I have an Excel Workbook Template that I use to populate data into from Access. If Excel is not running (or there are no other workbooks open) it opens fine and works correctly.
However, if Excel is running, I can't figure out how to make my workbook open. The procedure seems to run, but I cannot see the workbook that I need - as it shows the workbook that was already open (which isn't related to the Template I am using)
Here's the piece of the code I am running:
Everything I have found so far tells me how to check if an instance of excel is running. That's fine - but if the instance is running, how do I open my workbook into the running instance? This seems to only work if Excel is not running.
Thanks,
Carie
The problem I'm having is that I have an Excel Workbook Template that I use to populate data into from Access. If Excel is not running (or there are no other workbooks open) it opens fine and works correctly.
However, if Excel is running, I can't figure out how to make my workbook open. The procedure seems to run, but I cannot see the workbook that I need - as it shows the workbook that was already open (which isn't related to the Template I am using)
Here's the piece of the code I am running:
Code:
Dim xlsWKB As Object 'Variable for Workbook Name
Set xlsWKB = GetObject("C:\Contract Profile Form v2.01_TEST.xls")
xlsWKB.Application.Visible = True
xlsWKB.Parent.Windows(1).Visible = True
Everything I have found so far tells me how to check if an instance of excel is running. That's fine - but if the instance is running, how do I open my workbook into the running instance? This seems to only work if Excel is not running.
Thanks,
Carie