+ Reply to Thread
Results 1 to 4 of 4

Changing Command Button Caption with userform Open

  1. #1
    Registered User
    Join Date
    06-07-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    56

    Changing Command Button Caption with userform Open

    Hi all,

    How do you change the command button caption with the userform open?

    It changes when I change if it is enabled, but not when I change the caption.

    ie
    Please Login or Register  to view this content.
    This works in changing the button from enabled to to un-enabled with the userform still open

    Please Login or Register  to view this content.
    This does not change the text in the command button.

    Any ideas?
    Last edited by andrew c.; 07-07-2011 at 04:28 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Changing Command Button Caption with userform Open

    Hello andrew c.,

    You need to redraw the UserForm to show the update to the control's caption.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Changing Command Button Caption with userform Open

    You know, I've been reading books lately and I know that there are many out there so I haven't read them all but
    Please Login or Register  to view this content.
    ?????Seriously????? Where did you learn that. These VBA thingies still amaze me!
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Changing Command Button Caption with userform Open

    Hello Mordred,

    I learned it about a long time ago when I started learning VBA . I came it across in the object browser. It wasn't until I learned about how windows were constructed and functioned (from the Windows API) that I understood how to use it.

+ 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