Hi,
I'm trying to distribute a macro I created in an Addon file. The addon works on my computer, but does not work on someone elses computer. Here is what I'm doing:
1) Open up a brand new workbook
2) Save the work book and title it
3) Push Alt+F11 and create a module and paste my code
4) Create a toolbar with a button for a macro, and attach the macro that I just pasted to it
5) Go back to visual basic and edit the "ThisWorkbook" code module to have this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Toolbars("CountBinsToolbar").Visible = False
End Sub
Private Sub Workbook_Open()
Toolbars("CountBinsToolbar").Visible = True
End Sub
6) Save the file as an Addin in the addon folder with the same name of the workbook that I initially saved.
As I said when I run it on my machine it works fine, though initially it gave me trouble when I didn't save the workbook as the same name as the addon. When my friend tries to run it (he saves it in his addon folder also), he gets something like "application defined / object defined 1004 error" right at the get go and the toolbar doesn't even get added. I have a hunch that it might be a problem with the file path for the macro when I attach it for the button which I don't even understand why it attaches a path when the macro is copied into a module which is in the workbook / addon. We're both using excel 2003. Anyone ever experience this problem?
kiss
Bookmarks