+ Reply to Thread
Results 1 to 4 of 4

Active X Command Button not working after being hidden, then unhidden?

  1. #1
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    135

    Question Active X Command Button not working after being hidden, then unhidden?

    In a coded excel sheet:

    I have a unique problem that occurs on an excel sheet that I print to a pdf. During the print function, I unprotect the sheet, then hide the first 50 rows of data in the sheet that I do not want to show in the pdf print. That first 50 rows contains, besides data, about 23 buttons. Once the printing is completed, I then unhide the first 50 rows and protect the sheet again. At that point all but 4 of the buttons inactive and no longer function. If I click on them, there is no response. I have compared properties in the ones that do not work with the 4 that do, and there are no differences.

    I have found a simple work around, by unprotecting the sheet, using developer / design mode and then selecting the ones that no longer work. I then simply move them a couple of positions and then return them to their original positions, then protect the sheet again. I recorded these steps and just call it tickle. Then the buttons become active again.

    Is there something that I am overlooking that might cause this issue?

    OH, I forgot to mention that I have also tried making the buttons invisible and back, still the same problem occurs.
    Last edited by dentler; 12-30-2020 at 12:10 PM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Active X Command Button not working after being hidden, then unhidden?

    This happens to some users on my work network, but not others. I used to get around it by looping thorugh all the buttons and using Width = Width on each one. This is similar to your moving them then returning them but without the need to know their positions so the code is probably a little shorter.

    Now I just avoid ActiveX buttons and use Form Controls instead.

    BSB

  3. #3
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    135

    Re: Active X Command Button not working after being hidden, then unhidden?

    BadlySpelledBuoy, I apologize for not getting back to you before this, but I took you queue and that is exactly what I did to resolve my problem. Thank you.

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Active X Command Button not working after being hidden, then unhidden?

    Hi dentler. Very happy I could help and no apology for delay required.

    I know both of the options I alluded to had potential to work in your situation, and one of them appears to have done just that. What I don't know is which one you went for and worked for you...

    The thing about forums like this is, it's not just you asking a question and getting an answer from whizzy clever people donating their time and experience for free, but about the community (both present and future) learning from that question and that answer.

    So if you ever decide to come back and visit this thread, perhaps you'd feel the urge to be community minded and share which you decided on?

    BSB.

+ 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] Unhide hidden rows with active button
    By amilchev in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-29-2019, 08:22 AM
  2. Active - X Command Button
    By zoomzoomam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2018, 01:25 PM
  3. [SOLVED] Active X Command Button not working
    By gassiusmax in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-04-2015, 01:29 PM
  4. Using an Active X Command Button
    By Scottmcq12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2014, 05:04 AM
  5. Command button to show hidden worksheet
    By Chioma1975 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-03-2013, 12:24 PM
  6. [SOLVED] Toggle command buttons between hidden and unhidden, based on cell value and CODE name
    By Willardio in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-01-2013, 02:27 PM
  7. Tab sequence from cell to active x button and then to a command button
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2009, 02:27 PM

Tags for this Thread

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