Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax to address ThisWorkbook.BuiltinDocumentProperties via Access Automation? [email protected] Excel Discussion (Misc queries) 0 June 24th 08 01:29 AM
Urgent!!! Run-time error '-2147024770 (8007007e)' Automation error [email protected] Excel Programming 3 May 28th 08 04:51 AM
BuiltInDocumentProperties...some no workee CLR Excel Programming 4 September 29th 06 04:32 PM
BuiltInDocumentProperties CLR Excel Programming 7 May 25th 06 09:20 PM
BuiltinDocumentProperties Joop[_2_] Excel Programming 2 August 17th 03 11:28 AM


All times are GMT +1. The time now is 03:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"