PC Review


Reply
Thread Tools Rate Thread

Automatically use or update links between two sheets using VBA?

 
 
Karti
Guest
Posts: n/a
 
      20th Feb 2007
I have two worksheets on different servers and because they have links
you are asked to update the links before you continue.

Is there a way to use VBA to automatically update this link without
the message window opening up?

I need to remove the message window because it confuses my users!

Any and all help is appreciated!

Regards

Karti


 
Reply With Quote
 
 
 
 
kevinrj0314@gmail.com
Guest
Posts: n/a
 
      20th Feb 2007
On Feb 20, 9:42 am, "Karti" <j...@jetj.net> wrote:
> I have two worksheets on different servers and because they have links
> you are asked to update the links before you continue.
>
> Is there a way to use VBA to automatically update this link without
> the message window opening up?
>
> I need to remove the message window because it confuses my users!
>
> Any and all help is appreciated!
>
> Regards
>
> Karti
>


create an OpenWorkbook() macro that sets UpdateLinks:=1 when the
workbooks open...

-thatdude

 
Reply With Quote
 
Karti
Guest
Posts: n/a
 
      20th Feb 2007
Many thanks for the reply.

I now have within VBA

Sub OpenWorkbook()

Application.DisplayAlerts = False
UpdateLinks = 1

End Sub

I still receive the alerts.....any ideas?

Cheers

Karti





On 20 Feb, 16:34, kevinrj0...@gmail.com wrote:
> On Feb 20, 9:42 am, "Karti" <j...@jetj.net> wrote:
>
> > I have two worksheets on different servers and because they have links
> > you are asked to update the links before you continue.

>
> > Is there a way to use VBA to automatically update this link without
> > the message window opening up?

>
> > I need to remove the message window because it confuses my users!

>
> > Any and all help is appreciated!

>
> > Regards

>
> > Karti
> >

>
> create an OpenWorkbook() macro that sets UpdateLinks:=1 when the
> workbooks open...
>
> -thatdude



 
Reply With Quote
 
Karti
Guest
Posts: n/a
 
      20th Feb 2007

Actually after playing around I have the following - .

I now have within VBA

Sub OpenWorkbook()

Workbooks.Open Filename:="E:\Excel Test\testOne.xls", UpdateLinks:=3
Application.DisplayAlerts = False


End Sub

Now this works fine when I do it from an open book. But I would like
it to happen when the actual file opens .....any ideas?

Cheers

Karti



 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      24th Feb 2007
Karti,

I would alter that slightly. You are turning DisplayAlerts off and never
turning them back on. This can cause undesired effects. You should never end
your code and leave display alerts off. If the user makes a change and
decides to close the workbook, it will close immediately without asking if
they want to save changes. I also altered the first line also. This allows
the code to run when the workbook opens. The way you had it, it was a simple
macro that could only be run while the workbook was open.

Sub Workbook_Open()
Application.DisplayAlerts = False
Workbooks.Open Filename:="E:\Excel Test\testOne.xls", UpdateLinks:=3
Application.DisplayAlerts = True
End Sub

Regards,

Alan


"Karti" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Actually after playing around I have the following - .
>
> I now have within VBA
>
> Sub OpenWorkbook()
>
> Workbooks.Open Filename:="E:\Excel Test\testOne.xls", UpdateLinks:=3
> Application.DisplayAlerts = False
>
>
> End Sub
>
> Now this works fine when I do it from an open book. But I would like
> it to happen when the actual file opens .....any ideas?
>
> Cheers
>
> Karti
>
>
>



 
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
How do I update links from .xls sheets to .xlms sheets June Microsoft Excel Worksheet Functions 2 21st Apr 2010 08:57 PM
Can we update links automatically somehow after making a copy of a sheet with links? StargateFanFromWork Microsoft Excel Discussion 4 8th Dec 2005 09:37 PM
Re: How to update links between wk sheets Excel_Geek Microsoft Excel Worksheet Functions 0 25th Aug 2005 03:57 PM
How to update links between wk sheets nander Microsoft Excel Worksheet Functions 0 25th Aug 2005 03:42 PM
Help - update one sheet from 11 other sheets automatically marsh Microsoft Excel Misc 1 11th Aug 2004 08:35 PM


Features
 

Advertising
 

Newsgroups
 


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