+ Reply to Thread
Results 1 to 5 of 5

Displaced control buttons after hide unhide

  1. #1
    Registered User
    Join Date
    03-24-2011
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    3

    Displaced control buttons after hide unhide

    Hello,

    When i hide rows and the contol buttons on those rows, it some times happend that the buttons don't get back to the place where they belong after unhiding the rows. Why does this happen and what can i do about it?

    Thanx for replying!

  2. #2
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Displaced control buttons after hide unhide

    try

    Right click on the button-> format control->properties->do not move or size with cells
    regards

    johnjohns

    When you are not sure where to go, every road takes you there!

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Displaced control buttons after hide unhide

    I think you need the Move and size with cells option checked (if I'm reading your question correctly).

  4. #4
    Registered User
    Join Date
    03-24-2011
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Displaced control buttons after hide unhide

    Coun't do that because i'm adding rows with these buttons and should remain on right spot when extra rows are added.

    setting are now Move but don'r size with cells.

    I works propely for most of the time, hiding and unhiding, but sometimes the placement of buttons gets mixed up... It happens somethings after saving and closing the excel when buttons are hidden and when i start it again the hidden buttons get displaced to one spot where the hidden rows were/are.

    Am i makking any sense? my colleague has the same problem...

  5. #5
    Registered User
    Join Date
    03-24-2011
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Displaced control buttons after hide unhide

    Solved it with some extra coding...


    For d = 1 + (bh - 1) * 10 To 10 + (bh - 1) * 10
    ActiveSheet.Shapes("CommandButton" & d).Visible = True
    ActiveSheet.Shapes("CommandButton" & d).Top = Yplace(d, 1)
    ActiveSheet.Shapes("CommandButton" & d).Left = Yplace(d, 2)
    Next d

    Putting them back to there place if excel is going crazy again

    But if anyone knows the back ground of this issue...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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