A
asburypark98
Hi,
I've got a problem in my code I've written below.
The loop works for the first, third and fourth graphic: that is,
it saves them. But it doesn't save the second graph.
I've put a "pause" at the start and at the end of the loop, but
I haven't solved the problem..
Any suggestion very appreciated!
'-----------------------------------------------------
Private Sub CommandButton1_Click()
Dim i As Integer
Dim a As Range
Dim b As Integer
Set a = Range("C10:C13")
Dim PauseTime, Start, Finish, TotalTime
b = a.Rows.Count
For i = 1 To b
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
BLP = DDEInitiate("winblp", "bbk")
Call DDEExecute(BLP, "<blp-1><cancel>" & a(i).Text &
"<Index>GPC<GO>")
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
Call DDEExecute(BLP, "<SAVE><GO>")
Call DDETerminate(BLP)
Next i
End Sub
'------------------------------------------------------------------------
I've got a problem in my code I've written below.
The loop works for the first, third and fourth graphic: that is,
it saves them. But it doesn't save the second graph.
I've put a "pause" at the start and at the end of the loop, but
I haven't solved the problem..
Any suggestion very appreciated!
'-----------------------------------------------------
Private Sub CommandButton1_Click()
Dim i As Integer
Dim a As Range
Dim b As Integer
Set a = Range("C10:C13")
Dim PauseTime, Start, Finish, TotalTime
b = a.Rows.Count
For i = 1 To b
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
BLP = DDEInitiate("winblp", "bbk")
Call DDEExecute(BLP, "<blp-1><cancel>" & a(i).Text &
"<Index>GPC<GO>")
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
Call DDEExecute(BLP, "<SAVE><GO>")
Call DDETerminate(BLP)
Next i
End Sub
'------------------------------------------------------------------------