Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) Corey Excel Programming 2 January 9th 07 01:01 PM
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"