P
P McConnell
I'd like to protect the macros in a workbook but allow the user to save it as
a different filename. Once I lock the VBAProject I can't save as another
name. I'm thinking a solution would be to wrap unprotect and re-protect
around the save (if that's possible), but I'm stumped on the code. Please
see below...
'I need code to unprotect project here
ConNum = TextBox1.Value
ActiveWorkbook.SaveAs Filename:="C:\Orders\" & ConNum & ".xls"
Application.RecentFiles.Add Name:=ThisWorkbook.FullName
'Also code to protect project here
Thanks!
a different filename. Once I lock the VBAProject I can't save as another
name. I'm thinking a solution would be to wrap unprotect and re-protect
around the save (if that's possible), but I'm stumped on the code. Please
see below...
'I need code to unprotect project here
ConNum = TextBox1.Value
ActiveWorkbook.SaveAs Filename:="C:\Orders\" & ConNum & ".xls"
Application.RecentFiles.Add Name:=ThisWorkbook.FullName
'Also code to protect project here
Thanks!