Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automation Error with BuiltinDocumentProperties
I am getting an error: Automation Error. Can the BuiltinDocumentProperties
only be used with ThisWorkbook? I can't get it to work with the workbook wbkDataSource. If wbkDataSource.BuiltinDocumentProperties("Last Save Time") + TimeSerial(0, 10, 0) < Date Then 'do something End If Any ideas? -- Cheers, Ryan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automation Error with BuiltinDocumentProperties
Dim wbkdatsource As Workbook
Set wbkDataSource = ThisWorkbook Gord Dibben MS Excel MVP On Wed, 8 Oct 2008 11:57:04 -0700, RyanH wrote: I am getting an error: Automation Error. Can the BuiltinDocumentProperties only be used with ThisWorkbook? I can't get it to work with the workbook wbkDataSource. If wbkDataSource.BuiltinDocumentProperties("Last Save Time") + TimeSerial(0, 10, 0) < Date Then 'do something End If Any ideas? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automation Error with BuiltinDocumentProperties
Hi Ryan
The problem is that for some reason you can not get the value of BuiltinDocumentProperties on some machines, though you can on other machines with same softvware. Maybe you can use this: If FileDateTime(wbkDataSource.FullName) + TimeSerial(0, 10, 0) < Date Then 'do something End If Regards, Per On 8 Okt., 20:57, RyanH wrote: I am getting an error: *Automation Error. *Can the BuiltinDocumentProperties only be used with ThisWorkbook? *I can't get it to work with the workbook wbkDataSource. If wbkDataSource.BuiltinDocumentProperties("Last Save Time") + TimeSerial(0, 10, 0) < Date Then * *'do something End If Any ideas? -- Cheers, Ryan |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automation Error with BuiltinDocumentProperties
That works beautifullly. For some reason my original code would work with
ThisWorkbook, but the problem is that the code I want to run is not in wbkSourceData. I'm not sure why Microsoft won't allow you to use ActiveWorkbook or a Object Variable, weird. Thanks! -- Cheers, Ryan "Per Jessen" wrote: Hi Ryan The problem is that for some reason you can not get the value of BuiltinDocumentProperties on some machines, though you can on other machines with same softvware. Maybe you can use this: If FileDateTime(wbkDataSource.FullName) + TimeSerial(0, 10, 0) < Date Then 'do something End If Regards, Per On 8 Okt., 20:57, RyanH wrote: I am getting an error: Automation Error. Can the BuiltinDocumentProperties only be used with ThisWorkbook? I can't get it to work with the workbook wbkDataSource. If wbkDataSource.BuiltinDocumentProperties("Last Save Time") + TimeSerial(0, 10, 0) < Date Then 'do something End If Any ideas? -- Cheers, Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Syntax to address ThisWorkbook.BuiltinDocumentProperties via Access Automation? | Excel Discussion (Misc queries) | |||
Urgent!!! Run-time error '-2147024770 (8007007e)' Automation error | Excel Programming | |||
BuiltInDocumentProperties...some no workee | Excel Programming | |||
BuiltInDocumentProperties | Excel Programming | |||
BuiltinDocumentProperties | Excel Programming |