Hi,
I have a spell check macro for my password protected sheets.
I also have a userform with a few last inputs (in some text boxes) by the user and these are to be sent to the spreadsheet.
This will be the last part of the job card for the user to complete before printing the job card (as PDF)
I have command buttons in the userform.
One for "Cancel" to exit the userform without filling anything in.
One for adding the information to the spreadsheet
I now want to have a comand button to run a spell check in the spreadsheet.
My code for the spell check is:
and my code for the spell check command button is
When I click on the spell check button I get the following error.
Compile error:
Sub of Function not defined.
What am I doing wrong?
Please help this self taught excel and VBA user.
I have a spell check macro for my password protected sheets.
I also have a userform with a few last inputs (in some text boxes) by the user and these are to be sent to the spreadsheet.
This will be the last part of the job card for the user to complete before printing the job card (as PDF)
I have command buttons in the userform.
One for "Cancel" to exit the userform without filling anything in.
Code:
Private Sub btCancel_Click()
Unload Me
End Sub
One for adding the information to the spreadsheet
Code:
Private Sub btAddl_Click()
' Code written here. It is working good.
End Sub
I now want to have a comand button to run a spell check in the spreadsheet.
My code for the spell check is:
Code:
Private Sub Spel_Check()
ActiveSheet.Unprotect ("PassWord")
Cells.CheckSpelling
ActiveSheet.Protect ("PassWord")
End Sub
and my code for the spell check command button is
Code:
Private Sub btSpelCheck_Click()
Call Spel_Check
End Sub
Compile error:
Sub of Function not defined.
What am I doing wrong?
Please help this self taught excel and VBA user.