I have a userform that has a password protect on the userform. The problem is anyone can drag the userform down and access sheet 3. How to I stop this from happening so only staff with a password can get to sheet 3.
I have a userform that has a password protect on the userform. The problem is anyone can drag the userform down and access sheet 3. How to I stop this from happening so only staff with a password can get to sheet 3.
You could hide Sheet3 like you did with Sheet2 and Sheet1. Then your "password" code Unhides Sheet3 like it already does. You would need a least one sheet visible if Sheet3 is hidden. You could have a blank dummy Sheet4 visible.
I really don't want to hide sheet 3, it's already locked so no one can edit it without a password. Just want the user form to stay in place and not be dragged arround.
I am very sorry, I do not remember the author of code but I use it, see if it helps you!
Please Login or Register to view this content.
Regards, John55
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
...enjoy -funny parrots-
Alot of complie errors, didn't like "Me" anywhere in this code. Maybe it's me and not the code ☺
check the file, the code I added (you can see the '**** ... and delete the button from yr sheet, is just for testing
Last edited by john55; 04-30-2013 at 09:20 AM.
the code has to be in the userform not a normal module-or you'll get Me errors
Josie
if at first you don't succeed try doing it the way your wife told you to
Made those adjustments but now when I debug, I get Compile error at "q =" variable not defined. Never had this error before.
check all and see where you added by mistake a q
This "q" is where I am getting hung up....... It never had an error here before I included your code.
With ThisWorkbook.Worksheets("Sheet3")
→ q = .Cells(.Rows.Count, "a").End(xlUp).Row + 1
.Cells(q, 1).Value = Me.txtMaterial.Value
.Cells(q, 2).Value = Me.txtBin.Value
.Cells(q, 3).Value = Me.txtIssued.Value
.Cells(q, 4).Value = Me.txtReceived.Value
.Cells(q, 5).Value = Me.txtDate.Value
.Cells(q, 6).Value = Me.cboDEPARTMENT.Value
.Cells(q, 7).Value = Me.txtRecipient.Value
.Cells(q, 8).Value = Me.txtFaics.Value
.Cells(q, 9).Value = Me.cboInitials.Value
you need to declare q
before you use itPlease Login or Register to view this content.
Everything is working GREAT!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks