ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How to unprotect an excel sheet using VBA?

user-image
تم إضافة السؤال من قبل Majid Shafi Ahmad , Data Entry Operator (BS-12) , Punjab Food Authority
تاريخ النشر: 2016/10/20
Firas Shahadi
من قبل Firas Shahadi , Training And Development Director , Muhayal Assir National Hospital

the stright to point method is:

worksheet.unprotect "password"

 

Anand Srivastava
من قبل Anand Srivastava , ASSISTANT MANAGER

press alt F11 a popup window will appear, insert a security module in the VBA code using insert menu,then copy paste the window and save it and execute it by pressing F5

Mark Anthony Valenzuela
من قبل Mark Anthony Valenzuela , Food and Beverage(Waiter/Server) , TESDA(Technical Education and Skills Development Authority

press alt f11 insert a module using insert menu,then copy paste the window.and execute it by pressing f5

nasir iqbal
من قبل nasir iqbal , Team Lead , SBTC

A string that denotes the case-sensitive password to use to unprotect the sheet or workbook. If the sheet or workbook isn't protected with a password, this argument is ignored. If you omit this argument for a sheet that's protected with a password, you'll be prompted for the password. If you omit this argument for a workbook that's protected with a password, the method fails.

Masood Ahmed
من قبل Masood Ahmed , Training , Sungard (FIS)

Private Sub Unprotectsheet() 

 

 

'This code will protect "Sheet1" with the password test

 

    ActiveSheet.Unprotect Password:="test" 

    Sheets("Sheet1").Select 

    ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _ 

    False 

    ActiveSheet.Protect Password:="test" 

 

'This below code will then unprotect "sheet1" using password "test", you only 'need this bit for your question

  Sheets("Sheet1").Select 

ActiveSheet.Unprotect Password:="test"

 

'or you can use

Sheets("sheet1").Unprotect Password:="test"

 

 

 

     

End Sub 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟