Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Protecting part of a Spinner

I want to protect everthing about a Spinner except the ability to change the
"Incremental Change". Everybody would be able to change the Incremental
Change with the Protection Locked In without knowing the password.

Is this possible?
If it is, how would I do it?

Thankyou
Ed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Protecting part of a Spinner

Ed

You could do this with a macro, but I can't think of a way to do it with the
normal Format Control dialog. The first macro adds a button to change the
increment to the menu that you get when you right click a cell. You can't
get to the "Excel Control" right click menu when the sheet is protected, so
it won't do you any good. The second macro changes the SmallChange property

Sub CreateMenuItem()

With Application.CommandBars("Cell")
With .Controls.Add(msoControlButton)
.Caption = "Change Increment"
.OnAction = "ChangeSpinner"
End With
End With

End Sub

Sub ChangeSpinner()

Dim lNew As Long

lNew = Application.InputBox("Enter Increment", , , , , , , 1)

If lNew 0 Then
Sheet1.Spinners(1).SmallChange = lNew
End If

End Sub

Another thing that you could do is leave the spinner unprotected and change
the behavior of the Format Control menu item.

Sub ChangeFormatCb()

Application.CommandBars.FindControl(, 3061).OnAction = "ChangeSpinner"
Application.CommandBars.FindControl(, 3060).OnAction = "ChangeSpinner"

End Sub

That will take care of the Format Control menu item and the Format Control
item on the right click menu.

If you use either of these methods, be sure to set them back the way they
were when the workbook is Deactivated.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Ed" wrote in message
...
I want to protect everthing about a Spinner except the ability to change

the
"Incremental Change". Everybody would be able to change the Incremental
Change with the Protection Locked In without knowing the password.

Is this possible?
If it is, how would I do it?

Thankyou
Ed



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
protecting formulas without protecting sheet so grouping still wor JM Excel Discussion (Misc queries) 1 June 4th 09 06:42 AM
Can you hide a spinner??? shnim1 Excel Discussion (Misc queries) 1 March 23rd 06 08:49 PM
Spinner Maureen Excel Discussion (Misc queries) 2 May 23rd 05 02:07 PM
Using Protection on a Spinner Ed Excel Programming 0 October 12th 04 04:15 PM
Protecting buttons with VB code rather than protecting sheets/books? StargateFanFromWork Excel Programming 2 July 16th 04 04:03 PM


All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"