View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.excel.worksheet.functions,microsoft.public.excel
macropod macropod is offline
external usenet poster
 
Posts: 329
Default How to update an external excel sheet

Hi,

On PC 'A', you'd use code like:

Sub UpdateData()
ThisWorkbook.Save
Application.OnTime Now + TimeValue("0:01:00"), "UpdateData"
End Sub

On PC 'B', you'd use code like:

Sub RefreshLinks()
ThisWorkbook.RefreshAll
Application.OnTime Now + TimeValue("0:01:00"), "RefreshLinks"
End Sub

For PC 'A', the code forces a save every minute. For PC 'B', the code forces
a link refresh every minute.

As coded, you have to deliberately set each macro running. You could set
them running via an Auto_Open macro calling the relevant module in each
workbook. For PC 'A', that might not be desirable, since it means you won't
be able to make experimental changes without the risk of them being saved
and having no way of going back. You could add more code for suspending
either module, but the above should get you started.

Cheers

--
macropod
[MVP - Microsoft Word]


wrote in message
oups.com...
Computer A refresh automatically, is 100% live.

I do not know how to do a Macro in computer B, can you give me some
advice?

Thanks.


macropod ha escrito:

Hi,

You could probably use a timer driven macro to the 'B' workbook to

refresh
the links periodically, but you might have to add a similar one to the

'A'
workbook to make it save periodically also - I'm not sure whether the

link
would pick up unsaved data in this situation. Experiment and see.

Cheers

--
macropod
[MVP - Microsoft Word]


wrote in message
oups.com...
Ok here we go:

I have in bloomberg an excel sheet running with live prices.

I create other excel sheet in my computer linked to this file.

When I run for the first time in my computer the prices refresh only
one time, but I need to find a way to make my excel sheet to go to the
bloomberg excel sheet and update the prices. Something like a

refresh.

Is this more clear?

Thanks for all your help.


macropod ha escrito:

Hi,

You'll need to provide more information on how you're trying to link

the
two
workbooks, and what's not working.

--
macropod
[MVP - Microsoft Word]


wrote in message
oups.com...
The problem is that Bloomberg only allows updates in the same

computer.
So my idea is to link the excel sheets, right now I can not link

the
excel sheet in computer B to A with a refresh.

Any idea?

Thanks.



macropod ha escrito:

Hi,

You could link both workbooks to bloomberg, or link the workbook

on
computer
B to the workbook on computer A.

Cheers

--
macropod
[MVP - Microsoft Word]


wrote in message
oups.com...
The situation is this:

*All the computers have Windows XP.
*All this is working under a net.
*In computer A: I have a bloomberg terminal.
*In computer A: I have an excel sheet open linked to bloomberg

that
automatically updates the information.
*In computer B: I have an excel sheet and I want that

everything
updates in this computer too.

Any help?

Thanks.