+ Reply to Thread
Results 1 to 4 of 4

Captions of CommandButtons disappear after buttons are clicked

  1. #1
    Registered User
    Join Date
    12-07-2011
    Location
    minneapolis, mn
    MS-Off Ver
    Excel 2007
    Posts
    11

    Captions of CommandButtons disappear after buttons are clicked

    Hello

    I have a workbook with 5 sheets; on Sheet1, I have three CommandButtons, each directing to a unique Sub. Each Sub works by performing a semi-complex copy/paste from Sheet1 to one of the other Sheets (3, 4, and 5, respectively).

    After clicking on one of the buttons, its Caption seemed to disappear. Because there was actually a very thin, broken, horizontal line of black left behind on the button, I suspected that the BackColor (which is opaque) was actually, somehow, being layered on top of the ForeColor in a glitchy way... but when I made the BackColor Transparent, the Caption did not reappear. I clicked on the other two buttons to see if this behavior would be repeated, and it was: their Captions also disappeared, but in those two cases there was no remaining line of black indicating that the Caption was still present but simply not displaying properly.

    I then looked at the properties for each button, and the Caption was still present and unchanged for all three.

    Then, for the first button, I was able to fix this by reopening the properties, deleting the last word of the Caption, and retyping it. Now when I click on that button, its caption remains visible. However, I tried this same fix with the other two buttons and it did not work.

    Is this happening because excel is having a panic attack due to there being more than one CommandButton on a single sheet? Or are there too many sheets involved... or too many Subs pointing to all those different Sheets? Or is this a known issue with a known fix not related to excel's capacity limitations?

    Thank you for any advice you can offer.
    Last edited by elfsprin; 12-15-2011 at 06:18 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: Captions of CommandButtons disappear after buttons are clicked

    Hello elfsprin,

    Welcome to the Forum!

    My guess is the CommnadButtons are ActiveX controls and not Forms controls. Excel 2007 is quirky in many areas, especially where ActiveX controls are concerned. The easiest fix would be to replace the ActiveX controls with Forms controls, unless of course you need the event functionality of the ActiveX controls.
    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 Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Captions of CommandButtons disappear after buttons are clicked

    Hello elsprin,

    In the Properties for the CommandButton, change Take Focus on Click, from True to False, to see if that solves the problem.

    Good Luck!

  4. #4
    Registered User
    Join Date
    12-07-2011
    Location
    minneapolis, mn
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Captions of CommandButtons disappear after buttons are clicked

    Thank you for the quick replies. I do need the event functionality, so I ended up deleting and re-adding new ActiveX buttons for those two Subs. So far the blanking behavior isn't repeating, but if it does I'll try the Take Focus on Click change next.

+ 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