VBA Script Question

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hi All,

Below I pasted part of some script. On the last line of the script I
have
"WEDNESDAY PICK-PUT-VAS.xls'!Sheet4.hide_unhide_rows". The script
only works if the file name of the worksheet is the same as it is
written in the script. I would like it to work no matter what the
file name is changed to. Any help is appreciated.

Sheets("SUMMARY").Select
Application.Run "'WEDNESDAY PICK-PUT-VAS.xls'!
Sheet4.hide_unhide_rows"

James
 
Change Sheets("SUMMARY") to Activesheet

I would also move the Sub hide_unhide_rows out of sheet4 and place it in a
General Module.


Gord Dibben MS Excel MVP
 
Back
Top