View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default form buttons on sheet collapse on unhide - sometimes

Hi,

Am Wed, 15 Jan 2014 04:46:46 -0800 (PST) schrieb :

Why are these buttons doing this? What's the fix?


that only happens in xl2010. I guess it is a bug.
Write a macro to reset your buttons (here for buttons with topleftcell
D2, D5, D8):

Sub ResetButtons()
Dim shp As Shape
Dim myArr As Variant
Dim i As Long

myArr = Array("D2", "D5", "D8")
For Each shp In ActiveSheet.Shapes
If Left(shp.Name, 3) = "But" Then
shp.Top = Range(myArr(i)).Top
shp.Left = Range(myArr(i)).Left
i = i + 1
End If
Next
End Sub


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2