Calendar macro

brettsouth

New Member
Joined
Nov 12, 2002
Messages
47
I have managed to copy and save a calendar macro to my personal. xls file
Copied From(www.ozgrid.com/VBA/excel-calendar-dates.htm)

I wish to use this calendar on several other sheets but the calendar only appears to work in these other work books when the persona.xls work book is open.

What is the best way to copy a macro from one work book to another? :rolleyes:

PS: ( Remeber I'm a learner a stage one : cheers (y)
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
The whole idea of PERSONAL.XLS is that it is always open and hence your macros are always available. It is usually hidden, but you can unhide it if need be. Doesn't your PERSONAL.XLS workbook open up all the time? If not, it may be in the incorrect directory. I think it should be in the XLSTART directory under a long list of other hierarchical (sic) directories.
 
Upvote 0
Hi there

Just touching on your general enquiry regarding copying a macro from one workbook to another:

1. Open both workbooks
2. Use Alt+F11 to go to the VB Editor
3. In the Project Window locate the 2 workbook projects concerned
4. Locate the module with the code you need
5. Simply drag that module onto the other project.
6. This will make a copy of the module in the other workbook. If its called module 1 and the other workbook already has a module 1 the copied module will be automatically renamed (eg to 11). Delete any unrequired code.
7. Make sure there is nothing in the code with an unrequired association to the other workbook. For Example if the code runs another macro in the module, make sure it refers to the macro only by its name without the workbook name prefix.
8. If you assign the macro to a button in the other workbook just ensure that you assign the macro you have copied (it displays in the dialogue box as the macro name only, without any workbook name prefix).

regards
Derek
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top