• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Can not reference sheet , through Sheet's Code Name

Again, Marc already gave you a function that will allow you to find any sheet, anywhere, using its codename.

But my general answer to questions that are basically "what if I just want to do something pointless and unnecessarily complicated?", is to find a better way to spend your time. :)
 
As the default CodeNames are always the same * and exist as soon as
any worksheet is created even if its workbook is not yet saved,
so there is no problem at all …

(*) : as it depends too of the Excel language version.
Native english : Sheet1, french : Feuil1, italian : Foglio1, …
 
Again, Marc already gave you a function that will allow you to find any sheet, anywhere, using its codename.

But my general answer to questions that are basically "what if I just want to do something pointless and unnecessarily complicated?", is to find a better way to spend your time. :)

Dear Sir @Debaser ,

Thanks but ..That's not " pointless and unnecessarily" because I face trouble every time ,when I obtain (copy / paste) code from web to my personal.xlsb , every time I must update where written sheet1 to sheets(1) my personal.xlsb must not accept .sheet1....I have to convert it sheets(1) . Just for that point I ask quest as this thread...& I (& may be all users) got never written anywhere, never discussed concept about just reference sheets code name have its learnable & must be noted limitations....this is forever -life time be helpful for every one & your contribution & efforts I must appreciate.

Sir @Marc L,

I noted your point..
I must be re-study, re-practice to gain you valuable effort regarding reference sheet by its code name.

Thank you very much to both of you.

Regards,

Chirag Raval
 
The point of a codename is to refer to a specific existing sheet even if the user has moved or renamed its tab. They are of limited use between workbooks, in my opinion, and provide no benefit when dealing with workbooks/worksheets that your code has created.
 
Dear Sir @Debaser ,

What a Strait forward remebrable declaration , just fine, just I want that type of point
So I can steady In my mind till next new aspect about the subject.

I also more learned & refine concept about how lvels (Scopes- like Application level, workbooks level, sheets lavel s .etc)
Effects on referencing objects as conditions of Subjects. For that, & for any task, you must be practically face that situation
Either in real project or just for practice.

My only try for code available & can be modify any time, I prefer to store it to personal.xlsb
If I put code in particular workbook for use In that workbook only , means I must open that
Workbook if I want that's code to use for another workbook & each half an hour I have different workbook
So for use all useful code, I must open many workbooks .You can understand that situation how
Uncomfortable is.

Personal.xlsb is final real work taker & operator between any workbooks , even it have power to
Handle task between different applications and another anstances of between same applications.

So my try to run code without save it in particular workbook.
& Do it's job from personal.xlsb.

Yoh & Sir @Marc L also have power to throw the notes which is straight forward
&, Near full & final , with cover all limitations of subject which should ike by any one
Without struggle more about to search.

In many threads , people can see that finally solutions goes
Towards firstly 2nd or 3rd post , that declare your and other
Respectfully teacher's experience and power
To understand the user's situations and subjects.

Thank you very much.

Regards,

Chicago Raval
 
I can't see anything in that link that isn't covered here, and the author seems unaware of the option to set references between workbooks. ;)
 
Nice thread. Very beneficial. Even though I'm not well versed and don't know much about Private functions and how to use it and set arguments etc and couldn't understand how to use it for codename for another workbook not having the actual code, but overall great discussion and explanation and quite a few things that I learnt today about sheet name / sheet code name / sheet index and even the anotherworkbook.sheets(Shee1.Name) thing. Haven't had a chance to try that but if it works for me then that would be another arrow in my quiver.
Thanx All.
 
Back
Top