Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Zak Zak is offline
external usenet poster
 
Posts: 144
Default Macro doesnt work from another sheet

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Macro doesnt work from another sheet

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

"zak" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
Zak Zak is offline
external usenet poster
 
Posts: 144
Default Macro doesnt work from another sheet

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.

"Mike H" wrote:

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

"zak" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default Macro doesnt work from another sheet

Add this line to the start of the macro:

Worksheets("Sheet2").activate

"zak" wrote:

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.

"Mike H" wrote:

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

"zak" wrote:

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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
Zak Zak is offline
external usenet poster
 
Posts: 144
Default Macro doesnt work from another sheet

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

"Sam Wilson" wrote:

Add this line to the start of the macro:

Worksheets("Sheet2").activate

"zak" wrote:

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.

"Mike H" wrote:

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

"zak" wrote:

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.



  #6   Report Post  
Posted to microsoft.public.excel.programming
Zak Zak is offline
external usenet poster
 
Posts: 144
Default Macro doesnt work from another sheet

Dont worry, i sorted it!

thanks.

"zak" wrote:

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

"Sam Wilson" wrote:

Add this line to the start of the macro:

Worksheets("Sheet2").activate

"zak" wrote:

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.

"Mike H" wrote:

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

"zak" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Links doesnt work in the copy version of the original sheet Alireza Nejad[_2_] Excel Discussion (Misc queries) 2 February 23rd 09 06:44 PM
if i email my sheet & pivot to someone with ex2000 it doesnt work Megglesface Excel Discussion (Misc queries) 1 July 25th 08 04:35 PM
reference to other sheet doesnt work Jan Excel Worksheet Functions 3 August 21st 06 08:48 PM
some functions doesnt work in macro? ExcelPower[_2_] Excel Programming 3 February 20th 06 07:36 AM
Please help : Macro doesnt work on other PCs Jason Excel Programming 2 December 26th 05 09:49 AM


All times are GMT +1. The time now is 11:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"