I am using Excel 2010 and I do not have a lot of experience with command buttons or VBA.
I have a sheet that normally I use a scanner to scan in UPC barcodes but sometimes I need people to enter information manually.
I'm trying to create a Command Button that says something like, "Go to Manual Mode" and that Unprotects the sheet. I would like the button text to change when its it clicked to "Go to Scanning Mode" and that protects the sheet.
The farthest I've gotten is that I found the code below. I'm sure I could use the same below but with Worksheets("Main").Unprotect to unprotect. However, I'm not sure how to get a single button to change text or how to assign 2 alternating codes to the same button. Would really appreciate any help.
Private Sub ManualMode_Click()
Worksheets("Main").Protect
End Sub
Bookmarks