Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Must something be done to a userform?
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Must something be done to a userform?
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) | Excel Programming | |||
Userform to enter values and shown in same userform in list | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Activating userform and filling it with data form row where userform is activate | Excel Programming | |||
Access from add_in userform to main template userform.... | Excel Programming |