create a break in the run of code

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
|
 
Back
Top