Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Referencing Sheets

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Referencing Sheets

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.

--
Regards,
Tom Ogilvy



"Eric" wrote in message
...
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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing sheets Techclerk Excel Discussion (Misc queries) 4 May 26th 08 12:25 AM
When referencing other Sheets JT Excel Discussion (Misc queries) 1 March 14th 07 05:36 PM
Referencing a Range of Sheets [email protected] Excel Discussion (Misc queries) 3 February 12th 07 09:47 AM
Referencing Different Sheets in VBA [email protected] Excel Discussion (Misc queries) 4 September 1st 06 05:57 AM
Referencing other sheets - updates shakey1181 Excel Discussion (Misc queries) 7 July 24th 06 01:59 AM


All times are GMT +1. The time now is 07:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"