password protection

D

danial mansoor

wat is the vba code to protect sheet,wat i want if i pressed command
button sheet should be protected and set the password 123?

i also wanted to know is there a way to disable the ribbon using
macro?


can anyone one help me?
 
R

Robert Crandal

The code for pasword protecting a sheet would look
something like this:

Sheet1.Protect "123"

As for the ribbon, I'm afraid I don't know how to disable
that.

Good luck!
 

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