+ Reply to Thread
Results 1 to 6 of 6

How to create a loop of TextBox Names

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    How to create a loop of TextBox Names

    I use the following code to clear TextBoxes on a sheet when it is first activated:-
    Please Login or Register  to view this content.
    My problem is that there are another 8 TextBoxes that I need to ensure are cleared
    I do not want to change the names of the TextBoxes. How can I create a loop through 9 names?
    John

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,027

    Re: How to create a loop of TextBox Names

    Give this a go...Active Xcontrol TextBoxes...
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: How to create a loop of TextBox Names

    Hi there,

    Would something like this work?

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  4. #4
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: How to create a loop of TextBox Names

    WBD
    Many thanks for your suggestion which links nicely to that from sintek. I can't use it as it stands for there are other textboxes which have to remain with valuesw.
    Bu I have not coded with OLEObjects before and it looks like an area I should get to know.
    John

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,027

    Re: How to create a loop of TextBox Names

    ...........................................
    Thanks.gif

  6. #6
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: How to create a loop of TextBox Names

    Sintek, Many thanks for your help which works just fine for me. Thanks also for pointing me to OLEObjects. They look easier to use than remembering a list of 6 or 7 objects needed to refer to a shape.
    John

+ 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] Loop Through Folder, Create Emails with Sub Folder Names in Subject, Attach files in sub
    By Rschwar23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2015, 10:06 AM
  2. Is it possible to use loop Private Sub TextBox macro with different "TextBox" names
    By Newbiesan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2014, 10:26 AM
  3. [SOLVED] Create a Drop down that will list all names starting with initial letter of names.
    By blue leader in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 01-16-2014, 03:58 PM
  4. Loop Through Column A On Sheet 1 To Create Tabs With Each Workers' Names
    By Richie77777 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2013, 06:56 AM
  5. Create array of file names/sheet names
    By BVHis in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-06-2008, 11:30 AM
  6. Textbox / label names
    By cremate in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2008, 03:27 PM
  7. How to create local names (vs. global names)
    By Thomas Staudte in forum Excel General
    Replies: 5
    Last Post: 02-13-2006, 03:10 PM

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