ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Programing for This Document Only (https://www.excelbanter.com/excel-programming/421326-macro-programing-document-only.html)

SITCFanTN

Macro Programing for This Document Only
 
I've created macros for a document titled, "Balancing_Today" and I want those
macros only to apply to that workbook only, no others. I have the setting
for the macro buttons set to Macro In This Workbook however the code for the
macro appears in the other workbooks as well. How can I have those macros
appear in just the one document.

Thanks so much for your help.

Jim Cone[_2_]

Macro Programing for This Document Only
 

On the second line of the module (just below Option Explicit) add
Option Private Module
-or-
Prefix each Sub (macro) with Private ...

Private Sub GoodStuff()
'code
End Sub
--
Jim Cone
Portland, Oregon USA




"SITCFanTN"
wrote in message
I've created macros for a document titled, "Balancing_Today" and I want those
macros only to apply to that workbook only, no others. I have the setting
for the macro buttons set to Macro In This Workbook however the code for the
macro appears in the other workbooks as well. How can I have those macros
appear in just the one document.
Thanks so much for your help.


All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com