Referencing Sheets

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I'm trying to utilize sharing my workbook for the first
time, and have been getting "Run Time Error 1004
Application-defined or Object Defined error"

It appears that the problem is arising because my macros
reference locally defined sheet names. For example:

wsSheet.Visible = wsSheet.Name = "Prices"


There is probably a simple answer to this question, but
how do I qualify the locally defined name with it's
actual worksheet name. For example, the "Prices" sheet
above is actually Sheet11. How do I change my code to
reflect this?

Thanks all!
 
Are you asking how you use the codename of the sheet vice the tab name?

? worksheets("Prices").codename
Sheet11

You need to know one or the other.

? sheet11.Name
Prices


It would be difficult to use the codename as a variable reference.
 
Back
Top