lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I know how to protect workbook in vba using
What I want to do is to ask user this question:
do you want to protect workbooks? yes/no
If user say yes then I do
wrokbooks(1).protect
If user say no then I do
workbooks(1).unprotect
Any idea how this can be done? I know I need to use If statement but how can I get the Yes and No from the user? Thank you very much.
I know how to protect workbook in vba using
Code:
workbooks(1).protect
workbooks(1).unprotect
What I want to do is to ask user this question:
do you want to protect workbooks? yes/no
If user say yes then I do
wrokbooks(1).protect
If user say no then I do
workbooks(1).unprotect
Any idea how this can be done? I know I need to use If statement but how can I get the Yes and No from the user? Thank you very much.