Murray Brown
asked on
Excel Add-in VB.net - determine if active workbook has macros
Hi
I have quite a complicated add-in the causes strange errors if i open Excel by opening
a .xlsm file. I need to determine if the ActiveWorkbook is a .xlsm file.
How do I do this?
Private Sub ThisAddIn_Startup() Handles Me.Startup
If Globals.ThisAddIn.Applicat ion.Active Workbook.F ileFormat. ToString <> "52" Then
oAddInStartUp()
End If
End Sub
I have quite a complicated add-in the causes strange errors if i open Excel by opening
a .xlsm file. I need to determine if the ActiveWorkbook is a .xlsm file.
How do I do this?
Private Sub ThisAddIn_Startup() Handles Me.Startup
If Globals.ThisAddIn.Applicat
oAddInStartUp()
End If
End Sub
What happens with above code?
ASKER
If it is a .xlsm it doesn't load my add-in. I have to go into the Option Add-ins section and select COM Add-ins then re-check the box to make it available as the system unchecks this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes. Agreed