View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
A.W.J. Ales A.W.J. Ales is offline
external usenet poster
 
Posts: 63
Default Excel Macro for multiple sheet ??

Somu,

It's hard to tell (without seeing the code) whether this will work for you
but replace every cellreferende in your macro from ActiveSheet.Range("A1")
or something like (and offcourse all other cellreferences as well ) to
Worksheets("Sheet2").Range("A1") (In both cases you migth use Cells(1,1)
instead of Range("A1") ).

Better would be (if you always do both sheets together) to use a loop.

For I = 1 to 2
Your macro with Worksheets(I) insttead of something like ActiveWorksheet
or Worksheets("Sheet2")
Next


--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *

"somu " wrote in message
...
Hai Friends,

I have created a macro(to hide some rows). It is
attached to a command button in sheet1. It is working fine.

Now I want to run the same macro in sheet2 aslo
without opening sheet2. Is there a solution for this ???

Thanks in advance


---
Message posted from http://www.ExcelForum.com/