425
EXCELમાં બધી શીટ એકસાથે પ્રોટેક્ટ કે અનપ્રોટેક્ટ કરવી
Excelનો ઉપયોગ કરતી વખતે આપણે ફોર્મ્યૂલા અને લિંકને બચાવવા માટે શીટ પ્રોટેક્ટ કરતા હોઇએ છીએ. જ્યારે ફાઇલમાં ઘણી બધી શીટ હોય ત્યારે સુધારા કરતી વખતે વારંવાર શીટને પ્રોટેક્ટ અને અનપ્રોટેક્ટ કરવી પડતી હોય છે. આ પ્રક્રિયાને ઝડપી બનાવવા અહિં એકસાથે બધી શીટને પ્રોટેક્ટ અને અનપ્રોટેક્ટ કરવાની રીત બતાવેલ છે.
Code:
| |
Option Explicit
Sub ProtectAll()
Dim wSheet As Worksheet
Dim Pwd As String
Pwd = InputBox("Enter your password to protect all worksheets", "Password Input")
For Each wSheet In Worksheets
wSheet.Protect Password:=Pwd
Next wSheet
End Sub
Sub UnProtectAll()
Dim wSheet As Worksheet
Dim Pwd As String
Pwd = InputBox("Enter your password to unprotect all worksheets", "Password Input")
On Error Resume Next
For Each wSheet In Worksheets
wSheet.Unprotect Password:=Pwd
Next wSheet
If Err <> 0 Then
MsgBox "You have entered an incorect password. All worksheets could not " & _
"be unprotected.", vbCritical, "Incorect Password"
End If
On Error Goto 0
End Sub
| |
ઉપયોગની રીત:
|
|
Is a spreadsheet application developed by Microsoft for Microsoft Windows and Mac OS X. It features calculation, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications. It has been a very widely applied spreadsheet for these platforms, especially since version 5 in 1993, and it has replaced Lotus 1-2-3 as the industry standard for spreadsheets.
How to easily learn Microsoft Excel
I will give you all the formula of Excel please click on image