Hello all,

I am new to VBS scripting and could nto figure this out for the life of me.

I have a script that uses QueryTable in Excel to import in information from a webpage. There is a delay while Excel is importing. To ensure the script waits for the information is fully imported i wrote a wait function:

set queryTableLoopWait = objExcel.WorkSheets("TempInfoSheet").Cells.Find("Getting data")
do while (queryTableLoopWait = "something: Getting Data ...")
wscript.sleep(100)
set queryTableLoopWait = objExcel.WorkSheets("TempInfoSheet").Cells.Find("Getting data")
loop

But i keep getting a "Object variable not set" error at the do-while command. PLEASE HELP!!

P.S.: The only way i know how to detect if the querytable is still loading is by the message "something: Getting Data ..." that appears in the excel sheet while it's loading. If anyone knows a better way please let me know.

Thank you in advance.