PC Review


Reply
Thread Tools Rate Thread

Automation Error with BuiltinDocumentProperties

 
 
RyanH
Guest
Posts: n/a
 
      8th Oct 2008
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 With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      8th Oct 2008
Dim wbkdatsource As Workbook
Set wbkDataSource = ThisWorkbook


Gord Dibben MS Excel MVP

On Wed, 8 Oct 2008 11:57:04 -0700, RyanH <(E-Mail Removed)>
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?


 
Reply With Quote
 
Per Jessen
Guest
Posts: n/a
 
      8th Oct 2008
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 <Ry...@discussions.microsoft.com> 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 With Quote
 
RyanH
Guest
Posts: n/a
 
      9th Oct 2008
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 <Ry...@discussions.microsoft.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax to address ThisWorkbook.BuiltinDocumentProperties via Access Automation? EagleOne@discussions.microsoft.com Microsoft Access 2 24th Jun 2008 02:09 AM
Syntax to address ThisWorkbook.BuiltinDocumentProperties via Access Automation? EagleOne@discussions.microsoft.com Microsoft Excel Misc 0 24th Jun 2008 01:29 AM
BuiltInDocumentProperties =?Utf-8?B?Q0xS?= Microsoft Excel Programming 7 25th May 2006 09:20 PM
BuiltinDocumentProperties booshi Microsoft Excel Programming 3 17th Mar 2004 12:25 PM
BuiltinDocumentProperties Joop Microsoft Excel Programming 2 17th Aug 2003 11:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:43 PM.