• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Toggle Protect

Juzar22

Member
I have an excel file where i am using VBA code for highlight active row and column , now i also want to use toggle (turn on/off) worksheet protection when pressing Ctrl + u keys together will unprotect the worksheet, and pressing Ctrl + u keys together again will protect the worksheet again.

BUT i am getting RUN TIME error , attached is the error screen shot and my excel file, requesting for correction in code to solve the problem. Thanks
 

Attachments

  • Runtime error.JPG
    Runtime error.JPG
    114.9 KB · Views: 1
  • Example with error.xls
    91 KB · Views: 1
Hi ,

I downloaded the file I uploaded and tried it , and I do not get any error.

Try with the attached file and give feedback.

Narayan
 

Attachments

  • Sample file.xls
    80.5 KB · Views: 2
Hi ,

Can you bring up the Visual Basic editor screen , click on Tools and then References , and show a screenshot of what is displayed ?

Narayan
 
Hi ,

It is clear that your computer is missing the Calendar control.

Since this is not necessary , I am uploading this workbook , without this control added.

See whether everything works now.

Narayan
 

Attachments

  • Sample file.xls
    102.5 KB · Views: 2
Hi ,

It is clear that your computer is missing the Calendar control.

Since this is not necessary , I am uploading this workbook , without this control added.

See whether everything works now.

Narayan

Dear Narayan
Working perfect now, Thank You so much :)
 
Back
Top