Command button wz 2 function

B

Bakar

Hi Excel experts,
I want to have my Cmd button to use as follow
1st click protect the sheet with a password"123" already written in th
macros
then 2nd click same button i got the input box to insert the password t
unlock the sheet
that is Lock and Unlock sheet with same Button
also If I can have on the button "LOCK" when the sheet is unlock an
"UNLOCK" whenthe sheet is locked so thet when a user see the butto
he/she know that the sheet is whether await Lock or Unlock

Thanks very much for your hel
 
D

Don Guillett

Hi Excel experts,

I want to have my Cmd button to use as follow

1st click protect the sheet with a password"123" already written in the

macros

then 2nd click same button i got the input box to insert the password to

unlock the sheet

that is Lock and Unlock sheet with same Button

also If I can have on the button "LOCK" when the sheet is unlock and

"UNLOCK" whenthe sheet is locked so thet when a user see the button

he/she know that the sheet is whether await Lock or Unlock



Thanks very much for your help

Here is the basic idea. Modify to suit
Sub chgtextontoggleit()
ActiveSheet.Shapes("toggleit").Select
With Selection
If .Characters.Text = "Show" Then
msg = "NO show"
Else
msg = "Show"
End If
..Characters.Text = msg
End With
Range("a1").Select
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