Hello,
I have a Userform that is a calculator to calibrate a water pump or tractor irrigation nozzle.
What I want to know is, can I save this as an Add In whereby the Userform can be showed in any workbook? If possible, how do I go about doing it?
I have saved it as a Add In and ticked the right box, but when I call the Add In, I get a message that the macro is not available in this workbook or that macro's are disabled (which are enabled).
My code also refers to Activeworkbook and - cell. I also saved the following code (which I found on the net) in Thisworkbook to install the Add In button:
In the AddInInstall code:
macro that I Call is the
method
Regards,
I have a Userform that is a calculator to calibrate a water pump or tractor irrigation nozzle.
What I want to know is, can I save this as an Add In whereby the Userform can be showed in any workbook? If possible, how do I go about doing it?
I have saved it as a Add In and ticked the right box, but when I call the Add In, I get a message that the macro is not available in this workbook or that macro's are disabled (which are enabled).
My code also refers to Activeworkbook and - cell. I also saved the following code (which I found on the net) in Thisworkbook to install the Add In button:
Code:
Private Sub Workbook_AddinInstall()
With Application.CommandBars("Formatting").Controls.Add
.Caption = "KaliRekenaar" 'The button caption
.Style = msoButtonCaption
.OnAction = "kaliRekenaar" 'The Macro name you want to trigger
End With
End Sub
Private Sub Workbook_AddinUninstall()
On Error Resume Next
Application.CommandBars("Formatting").Controls("KaliRekenaar").Delete
On Error GoTo 0
End Sub
In the AddInInstall code:
Code:
The Application.CommandBars("Formatting").Controls.Add.OnAction
Code:
Userform1.Show
Regards,
Last edited: