Note: The other languages of the website are Google-translated. Back to English
Support is Online
We're back! We are here to assist you. Please be patient, we will respond to your tickets shortly.
Official support hours
Monday To Friday
From 09:00 To 17:30
  Saturday, 02 October 2021
  1 Replies
  2.7K Visits
0
Votes
Undo
can someone help me with this problem. its about this script.
Sub
ProtectSheetCheckSpellCheck()
'Update by Extendoffice 2018/11/2
Dim
xRg 
As
Range
On
Error
Resume
Next
Application.ScreenUpdating = 
False
    
With
ActiveSheet
        
.Unprotect (
"123"
)
        
Set
xRg = .UsedRange
        
xRg.CheckSpelling
        
.Protect (
"123"
)
    
End
With
Application.ScreenUpdating = 
True
End
Sub


Thanks for this. It has worked well, except that it changes my sheet protection settings every time I run it. I have my sheet protected, but set to allow users to format cells, columns, and rows; but after running this code, the protection is set back to the default. How can I retain my settings?
answer to that was; You have to modify the .protect code by adding allow the criteria you want. Worksheets("Sheet1").Protect,:=False, AllowInsertingColumns:=False, AllowInsertingRows:=False,:=False, AllowFiltering:=False, 
So please help my with the correct code if possible, cant get it to work with AllowInsertingRows.Protect ("Welkom") and then?????? bit of a nob tot thismy worksheet (tabs)  is called for example P&A or BIOp

and i can get it right in the original script?

 
9 months ago
·
#2313
0
Votes
Undo
Hi Mic@sha,

To allow your users to format cells, columns, and rows, please use the code below:

Sub ProtectSheetCheckSpellCheck()
'Update by Extendoffice 2021/12/20
Dim xRg As Range
On Error Resume Next
Application.ScreenUpdating = False
With ActiveSheet
.Unprotect ("123")
Set xRg = .UsedRange
xRg.CheckSpelling
'Password, Allow Formatting Cells, Allow Formatting Columns, Allow Formatting Rows
.Protect Password:="123", AllowFormattingCells:=True, AllowFormattingColumns:=True, AllowFormattingRows:=True
End With
Application.ScreenUpdating = True
End Sub


Amanda
  • Page :
  • 1
There are no replies made for this post yet.