Follow on from Hiding 5 command buttons - Excel 97 prob now

K

Karoo News

Hi I got this from Tom which works great on my Office XP but does not work
on 97. I'm not really familiar with that! Is it that 97 does not recognise
these instructions? Help most respected!

Sub ABC()
Dim Obj As OLEObject
For Each Obj In Worksheets( _
"New Style 2006").OLEObjects
If TypeOf Obj.Object Is MSForms.CommandButton Then
Obj.Visible = Not Obj.Visible
End If
Next
End Sub
 

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