Forms Group Box

G

Guest

Hi I used the following code from an old post below to hide group boxes and
it works a treat. (this has been placed in ThisWorkbook)

Sub HideAllGroupBoxes()
Dim Sh As Worksheet
Dim gBox As GroupBox
Set Sh = ActiveSheet

For Each gBox In Sh.GroupBoxes
gBox.Visible = False
Next gBox

End Sub


Question, when I open the workbook turning macro's off I cant then see the
groupboxes? I tried changing the statement above to gBox.Visible = True and
opening with macro's but I still cant see them,

So how do I go about seeing them again?
 
D

Dave Peterson

If you open the workbook with macros disabled, then your code that unhides them
won't run.

Open the workbook with macros enabled and then make your change ("= true") and
then run the macro to see if that works.
 
G

Guest

Hi Dave,

I tried that but still can't see them, I can select and drag the radial
buttons out of the box, and when I put them back in the rough area they work
as before so the Groupbox is still there, has me baffled.
 
G

Guest

Hi Dave,

Its started to behave itself after a reboot, but for the life of me not sure
what the problem was, thanks for the advice as always.
 
D

Dave Peterson

Glad you got it working--no matter how!
Hi Dave,

Its started to behave itself after a reboot, but for the life of me not sure
what the problem was, thanks for the advice as always.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top