ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   create a break in the run of code (https://www.excelbanter.com/excel-programming/394412-create-break-run-code.html)

dan

create a break in the run of code
 
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


Jim Rech

create a break in the run of code
 
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
"Dan" wrote in message
...
| 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
|



dan

create a break in the run of code
 
Thanks

"Jim Rech" wrote:

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
"Dan" wrote in message
...
| 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
|





All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com