View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Shatin[_2_] Shatin[_2_] is offline
external usenet poster
 
Posts: 56
Default Must something be done to a userform?

That solves the problem! Many thanks!


"Tom Hutchins" wrote in message
...
Go into the properties of your userform and set ShowModal to False. You
might
also want to add a 1-second delay before starting the other processing, to
make sure the userform gets drawn completely. To add a 1-second delay, use

Application.Wait Now + TimeValue("0:00:01")

Hope this helps,

Hutch

"Shatin" wrote:

I have a workbook with many XML maps. Whenever I want to refresh the XML
data, it would take some time. So I've done a userform to show a simple
"Please wait" message. There's no button or anything else on the
userform.
My macro is as below. When the macro is run, once the userform
("ProgressForm") is shown, it just stays there and the macro doesn't
proceed
to the next line. Must I do something to a userform once it's shown? How
can
I tell the macro to move to the next line?

Sub RefreshXML()

Dim xm As XmlMap

ProgressForm.Show 'There's no button on this form, only a simple
"Please
wait" label.

For Each xm In ThisWorkbook.XmlMaps
xm.DataBinding.Refresh
Next xm

ProgressForm.Hide

End Sub

TIA