Automatically use or update links between two sheets using VBA?
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" wrote in message
oups.com...
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
;)
|