Spinner Prob

Charlie

Board Regular
Joined
Mar 1, 2002
Messages
134
I am using a spinner to display the numbers 1-4 in a cell,I want these numbers to remain visible,the thing is when I protect the sheet this cell remains vulnerable to clear contents.Is there any way to protect these numbers from being cleared?

t
Thanks
Charlie
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
spinners ???? you can only show 1 cell visable,......


i think im right.. not a spinner fan try alternative active x control..

any help?
 
Upvote 0
no I think what he means jack is that he wants to protect the sheet and still use his spinner to change the number in the cell from 1-4 but when protected the cell cannot be changed, if he unlocks the cell it can be wiped so what he needs is some code to unlock the sheet when the spinner is pressed then relock afterwards.
 
Upvote 0
Go ahead and lock the cell displaying your values.
Simply add this to your spinbutton_Click routine.
Before the assignment:
Sheet1.Unprotect
Chg cell value...
After the assignement:
Sheet1.Protect

If you are using a password,
then add this to both statements...
Password:="YourPassword"

Ex.
Sheet1.Unprotect Password:="YourPassword"

Of course, replace Sheet1 with the correct sheet name or use this syntax:

Sheets("YourSheetName").Unprotect Password:="YourPassword"

Id you are only working on the Activesheet,
you may use:

ActiveSheet.Unprotect Password:="YourPassword"

Tom
 
Upvote 0
Thanx for the replies lads but I found a simpler solution,I hid the row with the output data in it thus protecting it from alteration , and I simply put in an appropriate cell =D20 which is the cell reference.This cell was covered by the normal protect sheet mechanism.
Thanks
Charlie
 
Upvote 0
sorry been lurking elsewere..

the reason is VBA is not always the answer as Chris D will tell, im for telling him to hide data , this has been covered,


TsTom like that code.... very good hope you dont mind if i keep that one.
 
Upvote 0

Forum statistics

Threads
1,214,613
Messages
6,120,515
Members
448,968
Latest member
Ajax40

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top