January 24, 2023
Hi,
Not sure if this can be answered as it's about Microsoft Word; but I'm sure it would run the same as excel.
I have a form fill document that is restricted so that they can't change the document at all; but rather just complete the necessary components. However; at the end of each block (multiple users) I have created a VBA that stamps their information by by using a command button; unfortunately because the doc is protected the VBA wont run.
Is there something I can add to the to each VBA to make it work?
Current VBA
Private Sub SuperVisor_Click()
Selection.Font.BoldBi = 10
Selection.Font.ColorIndex = vbBlack
Selection.TypeText ("VBA Sign Off By") & Chr(32) & Environ("UserName") & Chr(32) & Chr(15) & Chr(32) & _
Format (Date, "Long Date") & Chr(32) & Chr(150) & Chr(32) & _
Format (Time, "HH:MM:SS")
lbl_Exit:
Exit Sub
End Sub
Trusted Members
October 17, 2018
Hi,
I haven't tried it but maybe it works like in Excel.
You could trigger a macro that when you open the document it unprotects it and directly protects it again with the known password and add the parameter UserInterFaceOnly=True so that when the other macro is triggered it updates the fields.
Another option is to include the uprotect (with password) and after updateing protects it again
Hope my explanation makes sense
January 24, 2023
Hi Hans,
Thanks for that; and it may be a possible option but as I've been working with it I realised that I could unprotect sections (I've done this before but my old brain probaly forgot); so I should be able to place the Modules inside an unprotceted section.
Thanks Anyway; and you never know I may be back for more.
Regards
Paul
1 Guest(s)