Hi there,
I haven't previously had any problems loading/hiding etc userforms in vba, but I've just finished a project that runs fine when stepped through. However, when run properly, it returns a variable not defined error on the Load xForm command. The form is in the same templateproject and the load form command is the first to be executed.
Any ideas
Thanks in advance

Load userform returning variable not defined error (91)
Dietz
This code runs on the form's initialize event:
frmWeb.WebBrowser1.Navigate ("http://wokiisp.net/index_res.asp")
frmWeb.WebBrowser1.Document.all("ServiceID").Value = 71
WebBrowser1.Document.all("ServiceID").FireEvent ("onchange")
While WebBrowser1.Busy
DoEvents
Wend
frmWeb.WebBrowser1.Document.all("feedID").Value = 343
WebBrowser1.Document.all("feedID").FireEvent ("onchange")
While WebBrowser1.Busy
DoEvents
Wend
The 'onchange' event in each case reveals further items on the webpage. All I can think of is that for some reason processing the 'onchange' event does not trigger the webbbrowser1.busy loop so objects further down the line are not loaded before the code attempts to manipulate them when it is run rather than stepped through. If so, is there any other way I can pause the code whilst the webpage updates
Thanks once again in advance
Raj127799
Luis Esteban Valencia Muñoz
Could you post the code that executes when the form loads