Generate File Property
Pastel, you'll need an event procedure. Right-click on the sheet tab
of the worksheet you want. Select View Code. Insert this code. This
is just a sample, of course, but should get you started. James
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveWorkbook
If [a1] = 1 Then
.BuiltinDocumentProperties("Category") = "One"
ElseIf [a1] = 2 Then
.BuiltinDocumentProperties("Category") = "Two"
End If
End With
End Sub
Pastel Hughes wrote:
I would like some of my files to automatically generate a value in the File
Property field "Category", based on the contents of a specified cell (eg.
A1). If it is possible to do this, how would one go about it?
|