View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default Macro or ActiveX for buttons

Mickey,

I have discovered that (a) all the buttons can only be coloured grey

True. You have a lot more options with the ones from the Control Toolbox

that a user can select and delete the button

Crush their sticky little fingers

I have to leave the worksheets unprotected so that functions like auto filter
buttons work

You can protect the sheet with code and still allow AutoFilter to work
Sample code:

Sub ProtectFromStickyFingers()
With Worksheets("Sheet1")
.EnableAutoFilter = True
.Protect DrawingObjects:=True, _
contents:=True, Scenarios:=True, UserInterfaceOnly:=True
End With
End Sub

The above would have to be in the Workbook.Open Event as the
..EnableAutoFilter will not be there upon closing and reopening
the workbook.

Advice on the best way forward would be appreciated

I fought using the Control Toolbox for a while (the forms are easier)
but once you get used to using them, they are a lot more versatile.

John



Microsoft wrote:

Hi,
I am pretty much a novice at Macros but have managed to use several buttons
in a large workbook. I have discovered that (a) all the buttons can only be
coloured grey, and (b) that a user can select and delete the button ( I
have to leave the worksheets unprotected so that functions like auto filter
buttons work)

I have started to explore the control box and found that those buttons can
be coloured and seem to make things difficult for a user to mess and delete.

Q. Should I try and develop some buttons from the control box or continue
with the basic buttons provided by the toolbar (macros) Advice on the best
way forward would be appreciated,

Thanks,
Mickey