Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2007

Tip: Looking for answers? Try searching our database.

VBA Script Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James - 12 Dec 2007 16:24 GMT
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
Gord Dibben - 12 Dec 2007 16:46 GMT
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

>Hi All,
>
[quoted text clipped - 10 lines]
>
>James

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.