Skip to main content

How to allow spell check in a protected worksheet in Excel?

By default, the Spelling feature will be disabled after protecting worksheet as below screenshot shown. How to allow spell check in a protected worksheet in Excel? This article can help you.

Allow spell check in a protected worksheet with VBA code


Allow spell check in a protected worksheet with VBA code

Please run the below VBA code to enable the spell check feature in a protected worksheet.

1. Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy and paste the below VBA code into the Module window. See screenshot:

VBA code: Allow spell check in a protected worksheet

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

Note: In the code, number “123” is the password of the protected worksheet you have created for it. Please change it as you need.

3. Select the cell you need to enable the spell check in the protected worksheet, then run the VBA code by pressing the F5 key.

Then the Spelling dialog box pops up in the protected worksheet as below screenshot shown.


Related articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (12)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
HI thank you for this information it works well, but it gives away the password to anyone that uses it? is there a way to hide it?
This comment was minimized by the moderator on the site
Hi Bobbie Gower,
You can follow the following tutorial to hide the corresponding VBA Module to prevent others from viewing the password.
How to Protect and Hide Excel Macros
This comment was minimized by the moderator on the site
Hello!
スペルチェックができるようになりましたが、選択した範囲以外も引っかかってしまいます。選択した部分のみチェックしたい場合には、どうすればいいですか?
すみません、随分前にアップされたようですが、もしまだアクセスされているようでしたら、ご返信いただければ幸いです。
よろしくお願いいたします。
This comment was minimized by the moderator on the site
Hi korori,
I don't quite understand what you mean. The code works on the selected cells. If you want to check the spellings in a range, just select the range and run the code. Then the Spelling dialog box will pop up.
This comment was minimized by the moderator on the site
I'm trying to get a protected worksheet intended to be a form to have those fields that are entered by the form user to get spell check. This seems like you have to run VBA just to check one cell?
This comment was minimized by the moderator on the site
Hi,
The code has been updated with the problem solved, please have a try. Thank you for your comment.
This comment was minimized by the moderator on the site
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?
This comment was minimized by the moderator on the site
You have to modify the .protect code by adding allow the criteria you want.
Worksheets("Sheet1").Protect,<span style="letter-spacing: 0.2px; color: inherit; font-family: inherit; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit;">:=False, AllowInsertingColumns:=False, AllowInsertingRows:=False,</span><span style="letter-spacing: 0.2px; color: inherit; font-family: inherit; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit;">:=False, AllowFiltering:=False, </span>
This comment was minimized by the moderator on the site
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 this
my worksheet (tabs) is called for example P&A or BIOP
This comment was minimized by the moderator on the site
Hi, thanks for these steps, but please help!! I'm not getting the spell check window when pressing F5, instead I get a GoTo window listing all the names of the defined data ranges in my workbook. Thanks JulieD
This comment was minimized by the moderator on the site
Hi JulieD,
It's my mistake of the description in step 3. After selecting the cell, you need to go back to the Microsoft Visual Basic for Applications window and then press the F5 key to run the code. Sorry for the mistake and thanks for your comment.
This comment was minimized by the moderator on the site
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 this
my worksheet (tabs) is called for example P&A or BIOP
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations