Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Experts,
I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All forms in Excel97 are shown "modally" which means that the
calling code will stop at the Show method until the form is hidden. Excel 2000 and later can show forms "modelessly" which means that code execution proceeds after immediately after the Show method, but there is no reliable way to do this in Excel 97. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Syed Zeeshan Haider" wrote in message ... Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sved,
When you show a UserForm in Excel 97, Excel displays it as a *modal* form. That means the calling code will stop executing until you hide the Userform (or unload it). Typically, this is what you want anyway. You show a form, the user interacts with the form, and when the user clicks OK or Cancel, you hide the form and code execution continues. If you need to continue executing code, you could put the code in the form's Activate or Initialize event. If you want to show a form modelessly (code continues to execute) natively in Excel, you need to upgrade to at least Excel 2000. There are some workarounds (look at "modelessform.zip" on Stephen Bullen's site http://bmsltd.ie/Excel/Default.htm), however. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Syed Zeeshan Haider wrote: Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The macro stops because forms are "modal" in Office 97. While the for
is showing, only events on the form will be available (i.e butto clicks, dropdown lists, etc..) Once the form is hidden / closed the macro will continue at th statement following Userform1.show regards d -- Message posted from http://www.ExcelForum.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Chip, Jake and DM!
Thanks for the responses. After your replies, I have completed my project by modifying my approach to the coding. Actually, I wanted to display a progress bar which I designed by combining two Label controls. Thanks again! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My computer shows your system clock may be off or is it possible you did it
on purpose to stay at the top of the list? -- Don Guillett SalesAid Software "Syed Zeeshan Haider" wrote in message ... Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Don,
I depend a lot on my system clock, therefore, I never disturb it. I am in Pakistan and it has been set according to Pakistan Standard Time. Outlook Express is wise enough to convert other countries' time into PST (Pakistan Standard Time). Perhaps your computer's system clock is faulty or your newsreader's settings are disturbed. Presence of a virus cannot be ruled out. Anybody else on this for got this problem? With due respect Don, please try to avoid off-topic questions or mail me directly, if it is necessary. I was quite busy today with my project and I had to complete it by evening. That's why I was very active on the forum. Regards! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Don Guillett" wrote in message ... My computer shows your system clock may be off or is it possible you did it on purpose to stay at the top of the list? -- Don Guillett SalesAid Software "Syed Zeeshan Haider" wrote in message ... Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Syed,
Don's point was not off-topic. It is very bad etiquette to post the wrong time, and be sitting on top of the pile for hours or days on end. Your first reply was 11.5 hours before the question. This practice can obscures other posts, and make us miss questions, as well as being boring (seeing the same old post that has been answered sitting there). As a regular responder, Don voiced what many of us were feeling, and he was following our suggested etiquette by keeping it in the discussion. Responding in this way is not the way to garner support for your next question. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Syed Zeeshan Haider" wrote in message ... Hi Don, I depend a lot on my system clock, therefore, I never disturb it. I am in Pakistan and it has been set according to Pakistan Standard Time. Outlook Express is wise enough to convert other countries' time into PST (Pakistan Standard Time). Perhaps your computer's system clock is faulty or your newsreader's settings are disturbed. Presence of a virus cannot be ruled out. Anybody else on this for got this problem? With due respect Don, please try to avoid off-topic questions or mail me directly, if it is necessary. I was quite busy today with my project and I had to complete it by evening. That's why I was very active on the forum. Regards! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Don Guillett" wrote in message ... My computer shows your system clock may be off or is it possible you did it on purpose to stay at the top of the list? -- Don Guillett SalesAid Software "Syed Zeeshan Haider" wrote in message ... Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am sorry, if I have hurt and I'll take care in future.
Now I got it! Somebody had disturbed the regional settings of my system. Somebody had set the time zone to that of Canada. (You know kids. They like to do experiments.) That's why there was a conflict of time. Next time I'll take care of it and I hope it'll happen it again. If you had or somebody had confirmed this problem earlier, I'd have resolved it much before. Don, I apologize. I had assumed on my part that only you were facing the problem. No bad feelings! Thanks! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Bob Phillips" wrote in message ... Syed, Don's point was not off-topic. It is very bad etiquette to post the wrong time, and be sitting on top of the pile for hours or days on end. Your first reply was 11.5 hours before the question. This practice can obscures other posts, and make us miss questions, as well as being boring (seeing the same old post that has been answered sitting there). As a regular responder, Don voiced what many of us were feeling, and he was following our suggested etiquette by keeping it in the discussion. Responding in this way is not the way to garner support for your next question. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Syed Zeeshan Haider" wrote in message ... Hi Don, I depend a lot on my system clock, therefore, I never disturb it. I am in Pakistan and it has been set according to Pakistan Standard Time. Outlook Express is wise enough to convert other countries' time into PST (Pakistan Standard Time). Perhaps your computer's system clock is faulty or your newsreader's settings are disturbed. Presence of a virus cannot be ruled out. Anybody else on this for got this problem? With due respect Don, please try to avoid off-topic questions or mail me directly, if it is necessary. I was quite busy today with my project and I had to complete it by evening. That's why I was very active on the forum. Regards! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Don Guillett" wrote in message ... My computer shows your system clock may be off or is it possible you did it on purpose to stay at the top of the list? -- Don Guillett SalesAid Software "Syed Zeeshan Haider" wrote in message ... Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
to be honest I think the problem is on your side (something in your time settings). Your post is 11 hours ahead. So somehow your newsreader/etc is not set-up correctly Please have a look at this as some/many people will simply delete these kind of postings (as I do in most of the times) On a sidenote: IMHO I think it was correct from Don to post this to the NG :-) -- Regards Frank Kabel Frankfurt, Germany "Syed Zeeshan Haider" schrieb im Newsbeitrag ... Hi Don, I depend a lot on my system clock, therefore, I never disturb it. I am in Pakistan and it has been set according to Pakistan Standard Time. Outlook Express is wise enough to convert other countries' time into PST (Pakistan Standard Time). Perhaps your computer's system clock is faulty or your newsreader's settings are disturbed. Presence of a virus cannot be ruled out. Anybody else on this for got this problem? With due respect Don, please try to avoid off-topic questions or mail me directly, if it is necessary. I was quite busy today with my project and I had to complete it by evening. That's why I was very active on the forum. Regards! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Don Guillett" wrote in message ... My computer shows your system clock may be off or is it possible you did it on purpose to stay at the top of the list? -- Don Guillett SalesAid Software "Syed Zeeshan Haider" wrote in message ... Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Frank Kabel" wrote in message ...
to be honest I think the problem is on your side (something in your time settings). Your post is 11 hours ahead. So somehow your newsreader/etc is not set-up correctly You are right. Some kid had changed the time zone of my PC to that of Canada. That was causing the problem. I checked it right after Bob told that he also was facing this problem with my posts. On a sidenote: IMHO I think it was correct from Don to post this to the NG :-) Actually, I had assumed that only Don was facing that problem. I have received many off-topic political responses on other NG's of VB that's why I feel bad Abu dumping an excellent technical NG with political crap like some amateur politicians do. Thanks, Frank! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Syed Zeeshan Haider" schrieb im Newsbeitrag ... Hi Don, I depend a lot on my system clock, therefore, I never disturb it. I am in Pakistan and it has been set according to Pakistan Standard Time. Outlook Express is wise enough to convert other countries' time into PST (Pakistan Standard Time). Perhaps your computer's system clock is faulty or your newsreader's settings are disturbed. Presence of a virus cannot be ruled out. Anybody else on this for got this problem? With due respect Don, please try to avoid off-topic questions or mail me directly, if it is necessary. I was quite busy today with my project and I had to complete it by evening. That's why I was very active on the forum. Regards! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Don Guillett" wrote in message ... My computer shows your system clock may be off or is it possible you did it on purpose to stay at the top of the list? -- Don Guillett SalesAid Software "Syed Zeeshan Haider" wrote in message ... Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
glad you found your error (and just to confirm: your time looks o.k. now) :-) -- Regards Frank Kabel Frankfurt, Germany "Syed Zeeshan Haider" schrieb im Newsbeitrag ... "Frank Kabel" wrote in message ... to be honest I think the problem is on your side (something in your time settings). Your post is 11 hours ahead. So somehow your newsreader/etc is not set-up correctly You are right. Some kid had changed the time zone of my PC to that of Canada. That was causing the problem. I checked it right after Bob told that he also was facing this problem with my posts. On a sidenote: IMHO I think it was correct from Don to post this to the NG :-) Actually, I had assumed that only Don was facing that problem. I have received many off-topic political responses on other NG's of VB that's why I feel bad Abu dumping an excellent technical NG with political crap like some amateur politicians do. Thanks, Frank! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Syed Zeeshan Haider" schrieb im Newsbeitrag ... Hi Don, I depend a lot on my system clock, therefore, I never disturb it. I am in Pakistan and it has been set according to Pakistan Standard Time. Outlook Express is wise enough to convert other countries' time into PST (Pakistan Standard Time). Perhaps your computer's system clock is faulty or your newsreader's settings are disturbed. Presence of a virus cannot be ruled out. Anybody else on this for got this problem? With due respect Don, please try to avoid off-topic questions or me directly, if it is necessary. I was quite busy today with my project and I had to complete it by evening. That's why I was very active on the forum. Regards! -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com "Don Guillett" wrote in message ... My computer shows your system clock may be off or is it possible you did it on purpose to stay at the top of the list? -- Don Guillett SalesAid Software "Syed Zeeshan Haider" wrote in message ... Hello Experts, I have Excel 97 Pro on Win98SE. I have a certain piece of code in which UserForm1.Show stops the macro? E.g. Public Sub SomeProcedure() ' some working code here UserForm1.Show ' After this line, the macro won't proceed ' some should-work code here End Sub Why does UserForm1.Show stop the macro? Is there any way to prevent it? Thank you, -- Syed Zeeshan Haider -------------------------------------------------- http://szh.20m.com http://gomusharrafgo.20m.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening a file stops a Macro | Excel Worksheet Functions | |||
Macro repeats and then stops | Excel Discussion (Misc queries) | |||
Macro stops before beginning. | Excel Programming | |||
macro stops midstream | Excel Programming | |||
Macro stops when another workbook is open | Excel Programming |