ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change in action when converting to *.xla (https://www.excelbanter.com/excel-programming/355650-change-action-when-converting-%2A-xla.html)

Udo

Change in action when converting to *.xla
 
Hi experts,

there is a simple starting macro which runs fine when the file which
contains it is started separately:

Sub kick_off()
Windows("Help and aid.xls").Visible = False
ThisWorkbook.Sheets("Menu_Sheet").Visible = xlVeryHidden

With Application
.Calculation = xlManual
.MaxChange = 0.001
End With

Call CreateMenu

Application.ScreenUpdating = True

End Sub

When I convert it to an *.xla and start it from the Add-In-Manager, it
just generates an error message and doesn't do anything.

How can I cope with that?
Udo


Bob Phillips[_6_]

Change in action when converting to *.xla
 
Change ThisWorkbook to Activeworkbook. Thisworkbook refers to the addin,
Activeworkbook refers to the active workbook (couldn't think of a better way
to say that <vbg).

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Udo" wrote in message
oups.com...
Hi experts,

there is a simple starting macro which runs fine when the file which
contains it is started separately:

Sub kick_off()
Windows("Help and aid.xls").Visible = False
ThisWorkbook.Sheets("Menu_Sheet").Visible = xlVeryHidden

With Application
.Calculation = xlManual
.MaxChange = 0.001
End With

Call CreateMenu

Application.ScreenUpdating = True

End Sub

When I convert it to an *.xla and start it from the Add-In-Manager, it
just generates an error message and doesn't do anything.

How can I cope with that?
Udo





All times are GMT +1. The time now is 11:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com