Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent - How do i select a range of pages with a defined name?

Status
Not open for further replies.

gareth001

Technical User
Feb 4, 2003
43
GB
Hi,

I've got a list of pages i want to select using VB, the list of pages is contained within a defined name ("PageSelector"). When i use this defined name to select one sheet - eg.
Code:
   Dim PageSelect As String

   PageSelect = Evaluate("PageSelector")

   Sheets(PageSelect).Select

The code works with no problem, but as soon as i try and use multiple pages with

Code:
Sheets(Array(PageSelect)).Select

Nothing will work, the code just skips past this section. I've tried all types of ways of storing the page names, currently they are stored in excel as: "Pg1", "Pg2", etc.

Thank you very much for your help, I've been trying all everning to get this working.
 
Perhaps you'll want to try the Microsoft Office forum.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top