Do Until GetData <> "" DoEvents st=vba.timer do while vba.timer-st<30 doevents loop loop
Private Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)Do Until GetData <> "" DoEvents Sleep(30000) if len(Getdata)=0 then GetData="0":Exit Loop Loop
dim a as string a=time Do Until GetData <> "" DoEvents if datediff("s",a,time)=30 then if len(getdata)=0 then getdata="0" exit do endif endif Loop
DoEvents
st=vba.timer
do while vba.timer-st<30
doevents
loop
loop
DoEvents
Sleep(30000)
if len(Getdata)=0 then GetData="0":Exit Loop
Loop
a=time
Do Until GetData <> ""
DoEvents
if datediff("s",a,time)=30 then
if len(getdata)=0 then
getdata="0"
exit do
endif
endif
Loop