[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

update links question

Gary Keramidas

12/12/2006 5:00:00 AM

i'm not sure if the client's settings are going to be set to auto update links
or not. in the workbook, under edit/links , i set the startup prompt to "don't
display the alert and update links". it still prompts. i tried workbook open
code:

ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources

still get the prompt. how do i programmatically turn it off? the workbook is set
to read only recommended.

--


Gary



2 Answers

Dave Peterson

12/12/2006 3:38:00 PM

0

Excel notices the links before your code starts. So anything you do in this
workbook, won't help this workbook--but will "help" the next one.

If you really want more control over how the workbook gets opened, one way is to
build another workbook that opens the real workbook while controlling how it
should be opened.

Saved from a previous post:

Kind of like:

Option Explicit
Sub auto_open()
Workbooks.Open Filename:="c:\my documents\excel\book2.xls", UpdateLinks:=1
ThisWorkbook.Close savechanges:=False
End Sub

Then you open the dummy workbook and the links will be refreshed.
(read about that UpdateLinks argument in VBA's help.)

Then have the users open the dummy workbook.

(See help for those Updatelinks options)



Gary Keramidas wrote:
>
> i'm not sure if the client's settings are going to be set to auto update links
> or not. in the workbook, under edit/links , i set the startup prompt to "don't
> display the alert and update links". it still prompts. i tried workbook open
> code:
>
> ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
>
> still get the prompt. how do i programmatically turn it off? the workbook is set
> to read only recommended.
>
> --
>
> Gary

--

Dave Peterson

Gary Keramidas

12/12/2006 4:17:00 PM

0

ok, thanks dave.

--


Gary


"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
news:457ECCE5.4AACE33E@verizonXSPAM.net...
> Excel notices the links before your code starts. So anything you do in this
> workbook, won't help this workbook--but will "help" the next one.
>
> If you really want more control over how the workbook gets opened, one way is
> to
> build another workbook that opens the real workbook while controlling how it
> should be opened.
>
> Saved from a previous post:
>
> Kind of like:
>
> Option Explicit
> Sub auto_open()
> Workbooks.Open Filename:="c:\my documents\excel\book2.xls", UpdateLinks:=1
> ThisWorkbook.Close savechanges:=False
> End Sub
>
> Then you open the dummy workbook and the links will be refreshed.
> (read about that UpdateLinks argument in VBA's help.)
>
> Then have the users open the dummy workbook.
>
> (See help for those Updatelinks options)
>
>
>
> Gary Keramidas wrote:
>>
>> i'm not sure if the client's settings are going to be set to auto update
>> links
>> or not. in the workbook, under edit/links , i set the startup prompt to
>> "don't
>> display the alert and update links". it still prompts. i tried workbook open
>> code:
>>
>> ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
>>
>> still get the prompt. how do i programmatically turn it off? the workbook is
>> set
>> to read only recommended.
>>
>> --
>>
>> Gary
>
> --
>
> Dave Peterson