MartinK
Active Member
- Joined
- Oct 30, 2003
- Messages
- 384
Hello,
I have an add-in that is not installed (take it as fact) and is started via command line:
C:\TM1S7\Programs\tm1.xla /e
as a new instance of Excel. The add-in is kind of OLAP database.
In my code I would like to check whether I have started Excel with this add-in or not, if not I want to to exit the routine at its very start.
Is this the right approach? (I feel sorry I have to use a new variable, have already quite a lot in the routine, Explicit is On)
Thank you
Martin
I have an add-in that is not installed (take it as fact) and is started via command line:
C:\TM1S7\Programs\tm1.xla /e
as a new instance of Excel. The add-in is kind of OLAP database.
In my code I would like to check whether I have started Excel with this add-in or not, if not I want to to exit the routine at its very start.
Is this the right approach? (I feel sorry I have to use a new variable, have already quite a lot in the routine, Explicit is On)
Code:
'check for TM1, exit if not loaded
On Error Resume Next
Set chkTM = Workbooks("TM1.xla")
If Err Then MsgBox "TM1 Not Loaded!" & vbLf & vbLf & "Can't continue!", vbCritical + vbOKOnly, "TM1 not loaded": Exit Sub
Err.Clear
On Error GoTo 0
Martin