+ Reply to Thread
Results 1 to 14 of 14

How I decode VBA with Change sheet name from cell A2

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2007
    Posts
    28

    Smile How I decode VBA with Change sheet name from cell A2

    Dear
    Kindly revise my code not work after change sheet name from cell name
    Step
    1.If change name Worksheet("INPUT") in Colum A2 suach as "U21-U21"
    2.Change name at Work sheet("1") = same name in worksheet("INPUT") in Colum A2 suach as "U21-U21"
    Remake
    Name in Worksheet("INPUT") at colum "A2" can change name any time depends on what I wrote

    Thank you


    Please Login or Register  to view this content.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Pepe Le Mokko; 01-13-2020 at 11:02 AM. Reason: Replace HTML with code tags

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,813

    Re: How I decode VBA with Change sheet name from cell A2

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your INPUT sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Change the value in A2 and press the RETURN key. You do not need to click the button.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    04-23-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How I decode VBA with Change sheet name from cell A2

    WOWWWW Thank you for kindly to support from me
    Keep in touch

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,813

    Re: How I decode VBA with Change sheet name from cell A2

    You are very welcome.

  5. #5
    Registered User
    Join Date
    04-23-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How I decode VBA with Change sheet name from cell A2

    Dear
    Actually
    1.I want to write down a short word at Colum "A2" (not selected word)
    2.After that change sheet name(1) same name colum "A2"
    So my work is need to used Bottom
    Kindly how is revise code for me again
    Thank you so much
    art

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,813

    Re: How I decode VBA with Change sheet name from cell A2

    I want to write down a short word at Colum "A2" (not selected word)
    I'm not sure what you mean by the above quote. Are you saying that you want to enter a word at the bottom of column A? For example, in the file you posted, you would enter a word in cell A3. Is this correct? if not, please explain what you want to do in detail referring to specific cells, rows and columns.

  7. #7
    Registered User
    Join Date
    04-23-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How I decode VBA with Change sheet name from cell A2

    Dear Mumps1
    Sorry to not cleared from my require
    Step
    1.Only Colum A2 write Name short name suach as "U21-U21"--> write Name at worksheet"INPUT"
    2.Change name only worksheet"sheet1" = same name in Colum A2
    Remake
    Name in ONLY Colum "A2" can change name any time another colum no need

    Thank you

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,813

    Re: How I decode VBA with Change sheet name from cell A2

    I'm sorry but I still don't follow. I will explain how the macro I suggested works.
    When you enter a name in A2 and press the RETURN key, the name of Sheet1 will be changed to the name that was entered in A2. If you enter a name in any other cell, nothing will happen, in other words, the name of Sheet1 will not change. Is this what you want to do?

  9. #9
    Registered User
    Join Date
    04-23-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How I decode VBA with Change sheet name from cell A2

    Dear
    My work
    1.Need change name Colum"A2" after that
    2.Can change name sheet("1") =name in Colum"A2"
    3.Becuase my work will change short word in Colum"A2" only
    4.May be to reference Colum"A2"
    But I can not to do code is difficult
    Thank you

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,813

    Re: How I decode VBA with Change sheet name from cell A2

    "A2" refers to a cell not a column, so it would be cell A2 or column A. Maybe this is why I don't quite understand what you want to do. The macro does exactly what you described in steps 1 and 2 as long as you meant cell A2. I don't understand steps 3 and 4. Can you explain in the same way that I explained in Post #8. Please explain step-by-step.

  11. #11
    Registered User
    Join Date
    04-23-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How I decode VBA with Change sheet name from cell A2

    Dear
    My work
    1.Write short word in Colum"A2" after that
    2.Change name sheet("1") = name in Colum"A2"
    That's enough!
    Thank you

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,813

    Re: How I decode VBA with Change sheet name from cell A2

    My pleasure.

  13. #13
    Registered User
    Join Date
    04-23-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How I decode VBA with Change sheet name from cell A2

    Now I can to revise as below
    Sheets("Sheet1").Name = Worksheets("INPUT").Cells(2, 2).Value
    I'm so sorry for not being explained clearly. It's my fault.
    Thank you for your kindly support mate
    Last edited by lotto009; 01-14-2020 at 11:46 AM.

  14. #14
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,813

    Re: How I decode VBA with Change sheet name from cell A2

    This macro assumes that you still want to rename Sheet1 when you enter a name in cell A2. If you want to rename Sheet1 when you enter a name in a different cell, then change the A2 (in red) to the desired cell.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Is there a formula to decode URL's?
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 12-14-2021, 01:15 AM
  2. Decode this formula
    By tcolyer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-01-2018, 03:39 PM
  3. Decode the Cells
    By navneetvyas in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-24-2017, 03:35 AM
  4. [SOLVED] msgpack decode in VBA
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-29-2015, 10:58 AM
  5. Scramble Text and Decode
    By unclejemima in forum Excel General
    Replies: 6
    Last Post: 08-16-2015, 09:14 AM
  6. Decode text in a cell encoded in basecode64
    By renderman7 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2012, 05:06 AM
  7. [SOLVED] Change workbook sheet reference using cell A1 to change a vairable
    By Reed in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2005, 04:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1