Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 97
I found the following procedure in Help: Sub AddCustomProperty(dp As DocumentProperties) ' This example adds a new custom document property and names it "Complete". You must pass the custom _ DocumentProperties collection to the procedure. dp.Add Name:="Complete", LinkToContent:=False, _ Type:=msoPropertyTypeBoolean, Value:=False End Sub I use Dim dp As DocumentProperties then call the sub via AddCustomProperty dp and it errors saying "Object variable or With block variable not set." Various combinations of "Set dp = ..." result in various errors. -- Trent Argante [DC.J(166)] |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
After Dim you need to set the document properties object
Set dp = ThisWorkbook.CustomDocumentProperties Alok Joshi "Trent Argante" wrote: Excel 97 I found the following procedure in Help: Sub AddCustomProperty(dp As DocumentProperties) ' This example adds a new custom document property and names it "Complete". You must pass the custom _ DocumentProperties collection to the procedure. dp.Add Name:="Complete", LinkToContent:=False, _ Type:=msoPropertyTypeBoolean, Value:=False End Sub I use Dim dp As DocumentProperties then call the sub via AddCustomProperty dp and it errors saying "Object variable or With block variable not set." Various combinations of "Set dp = ..." result in various errors. -- Trent Argante [DC.J(166)] |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello: Is there a simple way to set the default user data, such as author,
title and company etc for all workbooks saved by me?? Thanks -- Max from Melbourne "Alok" wrote: After Dim you need to set the document properties object Set dp = ThisWorkbook.CustomDocumentProperties Alok Joshi "Trent Argante" wrote: Excel 97 I found the following procedure in Help: Sub AddCustomProperty(dp As DocumentProperties) ' This example adds a new custom document property and names it "Complete". You must pass the custom _ DocumentProperties collection to the procedure. dp.Add Name:="Complete", LinkToContent:=False, _ Type:=msoPropertyTypeBoolean, Value:=False End Sub I use Dim dp As DocumentProperties then call the sub via AddCustomProperty dp and it errors saying "Object variable or With block variable not set." Various combinations of "Set dp = ..." result in various errors. -- Trent Argante [DC.J(166)] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
data collection | Excel Discussion (Misc queries) | |||
help with data collection! | New Users to Excel | |||
Collection | Excel Programming | |||
Collection methods | Excel Programming | |||
Collection Variable | Excel Programming |