ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   New to Macros (https://www.excelbanter.com/excel-programming/402916-new-macros.html)

Peter[_8_]

New to Macros
 
I've been reading some things on the web about macros. I experimented
a bet. I have a couple of questions.

How do you make the macro apply only to a specific sheet? When I made
my macro, not only was it in every sheet in my workbook, but when I
opened a completely different workbook it was there as well.

So, then, how do you make your macro apply to only one specific
workbook?

Can you also apply your macro to five of six sheets in your workbook?
In other words, you want it to work on every sheet but one--how would
you single out that one that you don't want effected?

Thanks

Bob Phillips

New to Macros
 
A macro is within a workbook, but is still usable anywhere. You have to code
it to restrict it.

You could test the sheet in the macro, to see that it is the one that you
are interested in.

Other than that, I am not totally clear what you mean by '... it is in every
sheet'.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Peter" wrote in message
...
I've been reading some things on the web about macros. I experimented
a bet. I have a couple of questions.

How do you make the macro apply only to a specific sheet? When I made
my macro, not only was it in every sheet in my workbook, but when I
opened a completely different workbook it was there as well.

So, then, how do you make your macro apply to only one specific
workbook?

Can you also apply your macro to five of six sheets in your workbook?
In other words, you want it to work on every sheet but one--how would
you single out that one that you don't want effected?

Thanks





All times are GMT +1. The time now is 10:58 PM.

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