danomaniac
Programmer
I have an Outlook macro that opens an excel workbook when an email arrives to a specific folder - but if excel is already open it opens another instance - also if the desired workbook is already opened, it opens a read-only copy.
This is what I have:
Dim xlApp As Excel.Application
Dim wb As Excel.Workbook
Set xlApp = New Excel.Application
Set wb = GetObject("sampleworkbook.xls")
How do I:
If excel isn't open, open it and open the workbook.
If excel is open, but the workbook isn't, open the workbook.
if excel is open, and the workbook is open, activate the workbook?
Thanks.
"It's more like it is now, than it ever has been."
This is what I have:
Dim xlApp As Excel.Application
Dim wb As Excel.Workbook
Set xlApp = New Excel.Application
Set wb = GetObject("sampleworkbook.xls")
How do I:
If excel isn't open, open it and open the workbook.
If excel is open, but the workbook isn't, open the workbook.
if excel is open, and the workbook is open, activate the workbook?
Thanks.
"It's more like it is now, than it ever has been."