View Single Post
 
Old 07-26-2011, 07:11 PM
foolios foolios is offline Windows Vista Office 2010 32bit
Novice
 
Join Date: Jul 2011
Posts: 2
foolios is on a distinguished road
Default How do I assign a macro to a button when the macro is in my personal workbook?

I was able to assign the macro when it was in the same workbook as my worksheet but as it turns out the macro will only work if it's outside of the workbook. I cannot figure out how the macro is called from the button's sub now that it's in the PERSONAL.XLSB!Macro2

Before: I could just simply use
Code:
Private Sub CommandButton1_Click()
Macro2
End Sub
I tried

Code:
Private Sub CommandButton1_Click()
PERSONAL.XLSB!Macro2
End Sub
but that doesn't work.

The original problem as I've read is that updating between workbooks would require that the macro be outside the workbooks. So I've moved it and it does work from the run macros menu. But now it won't work when assigned to a button because, I believe, I am not referencing it properly.
Reply With Quote