#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default VBA code

I have a macro in sheet1 that automatically runs every 15
seconds and works on objects in that sheet.

Whenever I make another sheet active, the macro generates
an error because it expects the active sheet to be sheet1.

Is there a way to suspend the macro while another sheet is
active???

Is there a way to keep it operating even though another
sheet is active??

Thanks for any help.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default VBA code

Hi Paul

No.
Yes.
Post the code please, it's impossible to suggest anything without it.

HTH. Best wishes Harald

"Paul" skrev i melding
...
I have a macro in sheet1 that automatically runs every 15
seconds and works on objects in that sheet.

Whenever I make another sheet active, the macro generates
an error because it expects the active sheet to be sheet1.

Is there a way to suspend the macro while another sheet is
active???

Is there a way to keep it operating even though another
sheet is active??

Thanks for any help.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default VBA code

Why not insert at the appropriate point
if activesheet.name = "Sheet1" then
....
?


Steve


"Harald Staff" wrote in message
...
Hi Paul

No.
Yes.
Post the code please, it's impossible to suggest anything without it.

HTH. Best wishes Harald

"Paul" skrev i melding
...
I have a macro in sheet1 that automatically runs every 15
seconds and works on objects in that sheet.

Whenever I make another sheet active, the macro generates
an error because it expects the active sheet to be sheet1.

Is there a way to suspend the macro while another sheet is
active???

Is there a way to keep it operating even though another
sheet is active??

Thanks for any help.






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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Code to conditional format all black after date specified in code? wx4usa Excel Discussion (Misc queries) 3 December 26th 08 07:06 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
option buttons run Click code when value is changed via VBA code neonangel Excel Programming 5 July 27th 04 08:32 AM
VBA code delete code but ask for password and unlock VBA protection WashoeJeff Excel Programming 0 January 27th 04 07:07 AM


All times are GMT +1. The time now is 02:02 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"