Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

MS Excel text box problem

  • 13-06-2013 03:01PM
    #1
    Registered Users, Registered Users 2 Posts: 883 ✭✭✭


    Hi,

    I have an excel file (2003 version) with one sheet called sheet1.

    On sheet 1 I have multiple text boxes, however each text box has the same text box number "Text Box 1244".

    I was wondering if it's possible to rename the text boxes based on their location on the sheet.

    Eg. If i had a sheet with 12 rows of text boxes and 5 columns of text boxes (60 text boxes in total).

    The top left-hand box gets renamed to "Text Box 1", then the text box below that gets renamed to "Text Box 2" and so on to the bottom of the sheet. Then the vba script would move to the text box that was to the right of the first text box and rename all the text boxes in that column.

    I'm stuck on this problem a while now and cannot find any scripts to solve it. My VBA is non-existent, I usually get by on bits of code I find on the web. :pac:


Comments

  • Registered Users, Registered Users 2 Posts: 1,456 ✭✭✭FSL


    If all the text boxes have the same name then they are in an array and each one has a unique index. i.e. Text Box 1244(n)


  • Registered Users, Registered Users 2 Posts: 883 ✭✭✭sirpsycho


    Is that in 2003 also? I cannot see the (n) part, just "Text Box 1244".


Advertisement