|
|
|
|
|
|
Multiple Apps
|
Return BuiltInDocumentProperties for use in code
|
|
Ease of Use
|
Intermediate
|
Version tested with
|
2000, 2003
|
Submitted by:
|
mdmackillop
|
Description:
|
Shows a simple userform which lists values and indexes of BuiltInDocumentProperties
|
Discussion:
|
Check the values you need for creating your KB entries!
|
Code:
|
instructions for use
|
Option Explicit
Private Sub UserForm_Initialize()
Dim p
For Each p In ActiveWorkbook.BuiltinDocumentProperties
ComboBox1.AddItem p.Name
Next
ComboBox1.ListIndex = 0
End Sub
Private Sub ComboBox1_Change()
Label1.Caption = "Index is BuiltinDocumentProperties(" & ComboBox1.ListIndex + 1 & ")"
On Error GoTo ClearData
Label3.Caption = ActiveWorkbook.BuiltinDocumentProperties(ComboBox1.ListIndex + 1)
If Label3.Caption = "" Then
Label2.Caption = ""
Else
Label2.Caption = "Current value is"
End If
Exit Sub
ClearData:
Label2.Caption = ""
Label3.Caption = ""
End Sub
|
How to use:
|
- Create a userform with i combobox and 3 labels
- Copy the above code into the Userform code window
- Create a shortcut to open the userform
|
Test the code:
|
- Open the Userform
- Press the Down arrow to scroll throught all the properties
- The Index and Relevant values will be displayed
|
Sample File:
|
BuiltInProperties.zip 16.5KB
|
Approved by mdmackillop
|
This entry has been viewed 75 times.
|
|