Hi Folks,
I am trying to use the .CustomDocumentProperties method to carry over values from the current workbook thru to the next time the workbook is opened. I'd like to make the file READ ONLY so that no other changes can be made permanently.
The way I'd like to use .CustomDocumentProperties is by connecting it to a Control Panel sheet in the workbook. The user is going to be loading new data and exporting data into the file.
I have concerns that people will "break" the workbook by doing something that they shouldn't be.
Is there a way to allow the user to change the settings in the Control Panel and save only those changes and still leave the file as read only?
General Reference Code Lines:
Thanks,
Mike
I am trying to use the .CustomDocumentProperties method to carry over values from the current workbook thru to the next time the workbook is opened. I'd like to make the file READ ONLY so that no other changes can be made permanently.
The way I'd like to use .CustomDocumentProperties is by connecting it to a Control Panel sheet in the workbook. The user is going to be loading new data and exporting data into the file.
I have concerns that people will "break" the workbook by doing something that they shouldn't be.
Is there a way to allow the user to change the settings in the Control Panel and save only those changes and still leave the file as read only?
General Reference Code Lines:
Code:
Sub doc_props()
rw = 1
Worksheets("test").Activate
For Each p In ActiveWorkbook.CustomDocumentProperties
Cells(rw, 1).Value = p.Name
Cells(rw, 2).Value = p.Value
rw = rw + 1
Next
End Sub
Code:
Sub add_cust_doc_prop()
ThisWorkbook.CustomDocumentProperties.Add Name:="Control Panel Test", LinkToContent:=False, Type:=msoPropertyTypeString, Value:="Test"
End Sub
Code:
Sub rename_cust_doc_prop()
ThisWorkbook.CustomDocumentProperties.Item("Control Panel Test").Value = "bob"
End Sub
Thanks,
Mike