create a break in the run of code

G

Guest

Hi,
I am importing to excel data from another application (Bloomberg) then
creating a graph from it.
I have noticed that the data is not imported properly (only the firlt line
is displyed) unless I call a message box between the import of data and the
graph plotting of data ( I guess it needs some kind of break in order to copy
the data).
My problem is that I do not want this message box and trying to find a way
to closed automatically, I have tried sendimg {enter} via send key, I have
tried to just put a Application.Wait Now + TimeValue("00:00:05") intead of
calling a msgbox. But all that dis not work either.
Any idea
Thanks
Dan
 
J

Jim Rech

You might try looping with DoEvents until you get data

Sub MyCode()
Range("A1").ClearContents
''Code calling Bloomberg
Do
DoEvents
Loop Until Range("A1").Value <>""
End Sub

--
Jim
| Hi,
| I am importing to excel data from another application (Bloomberg) then
| creating a graph from it.
| I have noticed that the data is not imported properly (only the firlt line
| is displyed) unless I call a message box between the import of data and
the
| graph plotting of data ( I guess it needs some kind of break in order to
copy
| the data).
| My problem is that I do not want this message box and trying to find a way
| to closed automatically, I have tried sendimg {enter} via send key, I have
| tried to just put a Application.Wait Now + TimeValue("00:00:05") intead of
| calling a msgbox. But all that dis not work either.
| Any idea
| Thanks
| Dan
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top