Macro to allow spell check with protect sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

That about sums it up. Right now I have protect sheet active so that people
can only input data in the appropriate fields and not change the format of
the sheet or the title fields. Having it protected disallows spell check.
Any thoughts or ideas? Any comments welcome. :)
 
I just recorded this:

Sub Macro2()

ActiveSheet.Unprotect
Application.Goto Reference:="data"
Selection.CheckSpelling SpellLang:=2057
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("B2").Select
End Sub

Would this be OK?
Peter
 
Peter,
What does the "Range("B2").Select" do in this code?

Sorry for the delay in the response. Our servers have been down almost all
day. (Aaargh!!!)
Thanks for your help, Jason
 
Jason
I created a range name "Data" to allow user entry. The GoTo Reference
selects the range and spell checks it.

Range("B2").Select ermoves the selection on the whole range and selects the
first cell in the range for the next data entry.

I've been out for this afternoon so another delay!

Regards
Peter
 
Hello,

You may have to allow the macro to edit a protected worksheet, using
the "userinterfaceonly" property, for example:

Dim wSheet As Worksheet
For Each wSheet In Worksheets
wSheet.Protect Password:="Secret", UserInterFaceOnly:=True
Next wSheet
End Sub



HTH,
JP
 
Peter,
Thank you for your answer. I was able to use it to come up with the
appropriate code I needed. What I ended up doing was putting in a button
object and assigning a similar macro to spell check the whole sheet at once.
Once I understood exactly what yours did I was a ble to modify it
appropriately. Thanks again! All you guys are life-savers for us newbies.

Jason
 
JP,
This was very helpful as I did have one sheet in the workbook that required
me to put in the password for the unprotect. However I'm not familliar with
the "userinterfaceonly" property. If you could explain how that affects the
macro I would be very grateful. I really appreciate your willingness to help
me out!

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top