+ Reply to Thread
Results 1 to 13 of 13

Buttons need to hide/unhide along with columns

Hybrid View

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    California
    MS-Off Ver
    Office 2010
    Posts
    33

    Buttons need to hide/unhide along with columns

    Good afternoon,

    I am on the edge of pulling out what hair I have left. Basically, I have a spreadsheet where I want the buttons to hide when I shrink (hide) the columns, and reappear when I restore the column width (unhide). I've tried formatting the buttons all three ways (don't move, move don't size, move and size), and each doesn't work in their own unique way. Both options to "move" work, but
    then stop working as soon as I try to use it on a different computer.

    The buttons I'm using are form control buttons.

    Thank you very much for any help you can give!
    Attached Files Attached Files
    Last edited by rowlandjp; 11-28-2012 at 03:28 PM.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Buttons need to hide/unhide along with columns

    I don't understand your question.

  3. #3
    Registered User
    Join Date
    09-24-2012
    Location
    California
    MS-Off Ver
    Office 2010
    Posts
    33

    Re: Buttons need to hide/unhide along with columns

    If you open up the attached file you'll notice that when you click the hide button that the buttons are sometimes hiding, but not every time and not all of them.

    I have this same style macro on a much larger scale (188 different buttons) where the buttons won't hide.

    What I need is for the buttons to disappear when the columns they are in disappear.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-27-2012
    Location
    Birmingham England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Buttons need to hide/unhide along with columns

    Try making the next column at least as wide as the last column you are hiding, I think it's because the buttons in the right hand block are wider than the next column. i.e. Column k needs to be as wide as columns h:j. This seemed to work ok in your example file after making all the buttions the exact same size (1.4 x 2.3).
    Attached Files Attached Files
    Last edited by Dave Herbert; 11-27-2012 at 10:49 AM.

  5. #5
    Registered User
    Join Date
    09-24-2012
    Location
    California
    MS-Off Ver
    Office 2010
    Posts
    33

    Re: Buttons need to hide/unhide along with columns

    I tried flipping the column resize (to make the columns disappear) and button visibility. Still not working as soon as I move to a new station. Soooo frustrating for me.

    To clarify my problem further. The buttons are working fine, and hiding/unhiding like I'd like. The columns are resizing correctly. My issue is that when the buttons reappear when I open the document on a different workstation the buttons all open up on top of each other when I make them visible again instead of in the cells on the columns. Please see the attached image. Apologies for the redaction. Eventually all those "button 1s" will say something more descriptive.
    Attached Images Attached Images

  6. #6
    Registered User
    Join Date
    09-24-2012
    Location
    California
    MS-Off Ver
    Office 2010
    Posts
    33

    Re: Buttons need to hide/unhide along with columns

    Could it be because the buttons are becoming visible after the cells are resized in the VBA?

    I'm still having issues with the buttons not moving into their initial cells when opening the document on another workstation.

    Also, the file you attached isn't opening for me. It's saying it is corrupted, and the buttons aren't appearing.

    Thank you for all of your help!

  7. #7
    Registered User
    Join Date
    11-27-2012
    Location
    Birmingham England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Buttons need to hide/unhide along with columns

    The test file has corrupted on my PC too .... I'll have another go at it when I get home later.

    Is the other workstation using the same excel version?

  8. #8
    Registered User
    Join Date
    09-24-2012
    Location
    California
    MS-Off Ver
    Office 2010
    Posts
    33

    Re: Buttons need to hide/unhide along with columns

    Yes sir. Same version. However, when this finally goes live it will also be on stations that have Office '07.

    Thank you!


    P.s. Birmingham supporter? I arbitrarily assigned Leeds as my team back in the O'Leary days. Probably a bad time to pick them up. Been rough since ~04.

  9. #9
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Buttons need to hide/unhide along with columns

    RowlandJP

    I had the same issue and was ready to give up... in the end I did!

    I hope you have momre luck than me, however the following link seemed to have some relevance to the ActiveX controls, not sure if its the same with the form controls or not
    http://support.microsoft.com/kb/2503335

    Good luck,

    Mowgli

  10. #10
    Registered User
    Join Date
    09-24-2012
    Location
    California
    MS-Off Ver
    Office 2010
    Posts
    33

    Re: Buttons need to hide/unhide along with columns

    Oh wow, so would I have to apply this fix to every computer that would need this macro?

    Thanks for your response. Made me laugh, and it's good to know it's a Microsoft error not a I'm doing something dumb error.

  11. #11
    Registered User
    Join Date
    11-27-2012
    Location
    Birmingham England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Buttons need to hide/unhide along with columns

    Sorry, could not find this thread at home last night, glad you got an answer. I would not have known that.

    P.S. Yes life long Birmingham City fan so don't ask me anything about football

  12. #12
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Buttons need to hide/unhide along with columns

    RowlandJP,

    Yep it would mean patching every workstation, which our illustrious IT department will not do, therefore I could not check if it worked even.

    I did hear from someone that they thought it would only fix anything which was created AFTER the hotfix was applied (was someone from my IT department though and they were maybe just trying to get out of doing something about it), and there was no way I was going to start from scratch again so I redesigned my sheet to use data validation instead of drop down boxes etc.

    Could you maybe redesign the sheet to remove the buttons and maybe have them on separate forms which the first buttons make visible or hide? Just a thought that should hopefully then work on any workstation or version of Excel.

    Mowgli

  13. #13
    Registered User
    Join Date
    09-24-2012
    Location
    California
    MS-Off Ver
    Office 2010
    Posts
    33

    Re: Buttons need to hide/unhide along with columns

    Fix worked. IT applied change. I did not have to rebuild the entire document. Seems to be working fine. Thank you!

+ 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