Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-26-2011, 07:11 PM
foolios foolios is offline How do I assign a macro to a button when the macro is in my personal workbook? Windows Vista How do I assign a macro to a button when the macro is in my personal workbook? Office 2010 32bit
Novice
How do I assign a macro to a button when the macro is in my personal workbook?
 
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
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM
How do I assign a macro to a button when the macro is in my personal workbook? Launch macro sub after hitting "create pdf" button in word webharvest Word VBA 1 06-29-2011 04:56 PM
How do I assign a macro to a button when the macro is in my personal workbook? macro to transfer data from one workbook to another workbook virsojour Excel Programming 5 02-01-2011 08:58 PM
Macro Button B2W Excel 2 06-18-2010 09:36 AM
How do I assign a macro to a button when the macro is in my personal workbook? Select a range in one one workbook while working in other workbook Slow&Steady Excel 1 02-21-2010 03:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft