Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Spinner Prob

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    134
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    spinners ???? you can only show 1 cell visable,......


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

    any help?



    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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



  5. #5
    Board Regular
    Join Date
    Mar 2002
    Posts
    134
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.


    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •