David,
I'm trying the workaround, and I.m stuck again (I'm very new to VBA, but
been with Autocad for a long time). I tried opening the XL file in the
background to try to prevent the "do you want to update " message from
coming, and it is still there. So I thought I'd try your UpdateLink
parameter, but I'm obviously not getting it right. I've tried a lot of
variations, but it is essentially:
Excel.Workbooks.Open ("filename.xls",3)
I'm missing something in the syntax. The error message I get varies with
what I put in there, but everything turns out to be wrong. Can you give me
a clue?
Thanks,
C-
"David Moroni" wrote in message
news:1731025D98CE5309DB0140242DD30278@in.WebX.maYIadrTaRb...
> Charlie,
>
> Sorry, I'm still pretty new to Autocad, so I'm not familiar with the
> mcadDoc.UpdateGlobalParameterLink. I've run into the update links dialog
in
> other VB projects I've worked on, so I thought the UpdateLink parameter
> might apply here too. Good luck with this problem.
>
> David
>
> Charlie Carr wrote in message
> news:2656A027977E8FE3644DEB17AF238A16@in.WebX.maYIadrTaRb...
> > David,
> > Thanks for the response. Actually, the workbook isbeing opened via :
> > mcadDoc.UpdateGlobalParameterLink
> > From a stand alone workbook, this works fine. However when data is
called
> > to that workbook from a remote source, it returns the 'do you want to
> update
> > . . .' question. If both files are open, then I don't think the
question
> is
> > asked. I could use this as a workaround, I s'pose, but I'd rather find
a
> > way with a little more finess. Any other thoughts?
> >
> > Thanks,
> > C-
> >
> > "David Moroni" wrote in message
> > news:DB22309C4DB270425E91D0DB0364E6B5@in.WebX.maYIadrTaRb...
> > > Hi Charlie,
> > >
> > > If you are opening the workbook from VBA then you should check out
> the
> > > UpdateLinks argument for the .open statement. Given below is an
excerpt
> > > from Excel VBA Help:
> > >
> > > Syntax
> > >
> > > expression.Open(FileName, UpdateLinks, ReadOnly, Format, Password,
> > > WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter,
> Editable,
> > > Notify, Converter, AddToMRU)
> > >
> > > expression Required. An expression that returns a Workbooks or
> > RecentFile
> > > object.
> > >
> > > FileName Required String. The file name of the workbook to be
opened.
> > >
> > > UpdateLinks Optional Variant. Specifies the way links in the file
are
> > > updated. If this argument is omitted, the user is prompted to specify
> how
> > > links will be updated. Otherwise, this argument is one of the values
> > listed
> > > in the following table.
> > >
> > > Value Meaning
> > > 0 Doesn't update any references
> > > 1 Updates external references but not remote references
> > > 2 Updates remote references but not external references
> > > 3 Updates both remote and external references
> > > If Microsoft Excel is opening a file in the WKS, WK1, or WK3 format
and
> > the
> > > UpdateLinks argument is 2, Microsoft Excel generates charts from the
> > graphs
> > > attached to the file. If the argument is 0, no charts are created.
> > >
> > > Hope this helps.
> > >
> > > David
> > >
> > > Charlie Carr wrote in message
> > > news:B22FA25B56B138192FB79A0F92C96BA6@in.WebX.maYIadrTaRb...
> > > > (First posted in MDT5 group)
> > > > I am updating MDT5 global variables from an Excel workbook that is
fed
> > by
> > > > data from a second workbook. When I update the variables (in a VBA
> > > > routine), Excel returns a " . . . Do you want to update this
workbook
> > with
> > > > changes from the other workbook . . .? Yes or No." How do I issue
the
> > > > needed affirmative response to Excel to keep the program running?
> > Perhaps
> > > > this is a better question for the VBA group?
> > > >
> > > > Thanks.
> > > > Charlie-
> > > >
> > >
> >
>