Macro doesnt work from another sheet

  • Thread starter Thread starter zak
  • Start date Start date
Z

zak

I have attached my macro to a button and placed it in sheet 2 (which is an
empty sheet) but the macro doesnt work from that sheet. It does however work
if i put the button in the sheet where all the data is. I also wanted to
email a macro as well, how do i do this?

please advise.

thanks in advance.
 
Zak,

You macro may be looking at the active sheet when in fact the data you are
trying to work on may be in another. can you expand on the generic term of
'Doesn't work'

Mike
 
It reports error 1004, no cells were found. All the data the macro refers to
is in sheet 1 but i want to put the macro button in sheet 2 (because theres
no room on sheet 1). And some of my macros do refer to "activesheet" how can
i change this? but would this mean it would look in all sheets? i dont really
want it to do that, i just want the macro button to be in an empty sheet
because the one with all the info has no space! i know i can assign the macro
to a button on the toolbar but i need to email the worksheet to a colleague
with the macro on it, if its on the toolbar it wont display will it? thats
why i want it on a button, unless there is another way to email the macro?

thanks.
 
Add this line to the start of the macro:

Worksheets("Sheet2").activate
 
Another problem, that sheet will sometimes change too!

I need a way so that i can get the macro on my colleagues toolbar without
having to email him the code to input himself (coz theres so much).

please advise how i can get the macro to work from a colleagues toolbar..
how can i email or export across?

thanks
 
Dont worry, i sorted it!

thanks.

zak said:
Another problem, that sheet will sometimes change too!

I need a way so that i can get the macro on my colleagues toolbar without
having to email him the code to input himself (coz theres so much).

please advise how i can get the macro to work from a colleagues toolbar..
how can i email or export across?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top