+ Reply to Thread
Results 1 to 8 of 8

Is there a way to format all TextBoxes on a UserForm the same at one time?

  1. #1
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Is there a way to format all TextBoxes on a UserForm the same at one time?

    I have 30+ Textboxes on the form.

    In the process of entering data the textBoxes get different .BackColor settings.

    When the reset command button is hit the boxes stay the same colors, so I was hoping that I could reset them with a single command rather than 30+ lines of formatting code.
    Last edited by D3Pratt; 04-01-2009 at 06:56 PM.

  2. #2
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Is there a way to format all TextBoxes on a UserForm the same at one time?

    I hate to admit it, I strayed...

    I found this on (shudder) another site. but since it works and I couldn't find anything here, I'll post it for posterity.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is there a way to format all TextBoxes on a UserForm the same at one time?

    If you're cross-posting without links, we have a problem.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Is there a way to format all TextBoxes on a UserForm the same at one time?

    There was no cross post. I found the answer using a search on Google that sent me to a different site.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is there a way to format all TextBoxes on a UserForm the same at one time?

    Thank you. That's an honorable way to be unfaithful

    I always use Google to solve Excel problems, and am not surprised when I find links right back to here -- I agree in casting a net as wide as possible.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Is there a way to format all TextBoxes on a UserForm the same at one time?

    Looping through controls on a UserForm has been covered here many imes, possibly your serch terms didn't find it. Here's some alternative ways to try. I thinkk it's best to refer to the Control as MsForms.Controls - I have had errors in the past by not using MsForms.

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Is there a way to format all TextBoxes on a UserForm the same at one time?

    Thanks Roy! The problem was, that during my search (and me being a noob) I didn't know what I was really searching FOR, I didn't know I needed a loop, I was looking for a single global TextBox Command. So I did a search based on the problem I was having and found some other thread started by a similar thinking noob.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Is there a way to format all TextBoxes on a UserForm the same at one time?

    No problem, at least you tried to help yourself.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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