Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Magenta Ricci   on Mar 04 In MS Office Category.

  
Question Answered By: Oliver Evans   on Mar 04

A number passed to Worksheets will be treated as an index into the collection,
not a reference to the name of the sheet.

I'd think that about the only way you'd be able to find sheets with numeric
names would be to loop through the sheets and check their names against what
you're looking for.

Numbers are not very good names for sheets. Name your sheets something like
"Department 310" - much more readable as well as easier to use.

You can still keep your integer  array of department numbers. Just append it to
"Department " every time you want to name or use a sheet. E.g.:

Worksheets("Department " & Data(i)).Range("a1").PasteSpecial

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Problem copying/pasting with variable in worksheet name Or get search suggestion and latest updates.


Tagged: