#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 371
Default DoEvents??

I have recently put a modal form onto a networked pc. The pc has its own
stand-alone version of Excel installed.

The form can take several minutes to complete and it has been reported that
very occasionally in the middle of completion, Excel crashes with a serious
error.

This is more likely if there has been an interuption during completion and
'several' minutes turns out to be 15 or even longer. (There is a Hide button
on the form for this reason and also to facilitate reference to other files.
I am reasonably confident this functionality does not cause conflicts)

When the form completes ok (great majority of occasions) and control is
released back to the application there is a period of several seconds when
the busy icon is visible and the pc 'catches up' with its 'housework'.

I have 2 questions:
1. Can the demands of a network 'intefere' with the running of a modal form?
For instance I know the network polls for emails every 30 minutes from a
central point elsewhere.
2. Should I be releasing control back to the application at various stages
during completion of the form by liberally using DoEvents?

T.I.A.

Geoff
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default DoEvents??

Can the demands of a network 'intefere' with the running of a modal form?

There are a zillion things going on in a PC from moment to moment. The
system allocates processor time among them. When one has it the others
don't. But I've never noticed that my Excel apps are being shortchanged,
much less crashing it.<g

Should I be releasing control back to the application at various stages


I don't think you can do that even if it was a good idea. When you Show a
modal userform your code is suspended until the user does something. You
can't run anything. If you think you're tying up the system have a look at
the Performance page of the Windows Task Manager with a userform up. To me
it looks like a waiting userform isn't very demanding at all.

--
Jim
"Geoff" wrote in message
...
|I have recently put a modal form onto a networked pc. The pc has its own
| stand-alone version of Excel installed.
|
| The form can take several minutes to complete and it has been reported
that
| very occasionally in the middle of completion, Excel crashes with a
serious
| error.
|
| This is more likely if there has been an interuption during completion and
| 'several' minutes turns out to be 15 or even longer. (There is a Hide
button
| on the form for this reason and also to facilitate reference to other
files.
| I am reasonably confident this functionality does not cause conflicts)
|
| When the form completes ok (great majority of occasions) and control is
| released back to the application there is a period of several seconds when
| the busy icon is visible and the pc 'catches up' with its 'housework'.
|
| I have 2 questions:
| 1. Can the demands of a network 'intefere' with the running of a modal
form?
| For instance I know the network polls for emails every 30 minutes from a
| central point elsewhere.
| 2. Should I be releasing control back to the application at various stages
| during completion of the form by liberally using DoEvents?
|
| T.I.A.
|
| Geoff


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 371
Default DoEvents??

Hi
I'm clutching at straws. The form works without fault on other pcs which
are not networked. The difference is the networked pc runs on Office 2002
SP1 whereas mine is SP3. The other ok install runs on Office 2003.
I just don't know where the problem may lie and when the user mentioned the
fault was more likely to occur after an interupption I had to start thinking
of network or system delays, unlikely though that may be.

Geoff

"Jim Rech" wrote:

Can the demands of a network 'intefere' with the running of a modal form?


There are a zillion things going on in a PC from moment to moment. The
system allocates processor time among them. When one has it the others
don't. But I've never noticed that my Excel apps are being shortchanged,
much less crashing it.<g

Should I be releasing control back to the application at various stages


I don't think you can do that even if it was a good idea. When you Show a
modal userform your code is suspended until the user does something. You
can't run anything. If you think you're tying up the system have a look at
the Performance page of the Windows Task Manager with a userform up. To me
it looks like a waiting userform isn't very demanding at all.

--
Jim
"Geoff" wrote in message
...
|I have recently put a modal form onto a networked pc. The pc has its own
| stand-alone version of Excel installed.
|
| The form can take several minutes to complete and it has been reported
that
| very occasionally in the middle of completion, Excel crashes with a
serious
| error.
|
| This is more likely if there has been an interuption during completion and
| 'several' minutes turns out to be 15 or even longer. (There is a Hide
button
| on the form for this reason and also to facilitate reference to other
files.
| I am reasonably confident this functionality does not cause conflicts)
|
| When the form completes ok (great majority of occasions) and control is
| released back to the application there is a period of several seconds when
| the busy icon is visible and the pc 'catches up' with its 'housework'.
|
| I have 2 questions:
| 1. Can the demands of a network 'intefere' with the running of a modal
form?
| For instance I know the network polls for emails every 30 minutes from a
| central point elsewhere.
| 2. Should I be releasing control back to the application at various stages
| during completion of the form by liberally using DoEvents?
|
| T.I.A.
|
| Geoff



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default DoEvents??

I'm clutching at straws.

I feel your pain<g. Sorry I couldn't be more helpful.

--
Jim
"Geoff" wrote in message
...
| Hi
| I'm clutching at straws. The form works without fault on other pcs which
| are not networked. The difference is the networked pc runs on Office
2002
| SP1 whereas mine is SP3. The other ok install runs on Office 2003.
| I just don't know where the problem may lie and when the user mentioned
the
| fault was more likely to occur after an interupption I had to start
thinking
| of network or system delays, unlikely though that may be.
|
| Geoff
|
| "Jim Rech" wrote:
|
| Can the demands of a network 'intefere' with the running of a modal
form?
|
| There are a zillion things going on in a PC from moment to moment. The
| system allocates processor time among them. When one has it the others
| don't. But I've never noticed that my Excel apps are being
shortchanged,
| much less crashing it.<g
|
| Should I be releasing control back to the application at various
stages
|
| I don't think you can do that even if it was a good idea. When you Show
a
| modal userform your code is suspended until the user does something.
You
| can't run anything. If you think you're tying up the system have a look
at
| the Performance page of the Windows Task Manager with a userform up. To
me
| it looks like a waiting userform isn't very demanding at all.
|
| --
| Jim
| "Geoff" wrote in message
| ...
| |I have recently put a modal form onto a networked pc. The pc has its
own
| | stand-alone version of Excel installed.
| |
| | The form can take several minutes to complete and it has been reported
| that
| | very occasionally in the middle of completion, Excel crashes with a
| serious
| | error.
| |
| | This is more likely if there has been an interuption during completion
and
| | 'several' minutes turns out to be 15 or even longer. (There is a Hide
| button
| | on the form for this reason and also to facilitate reference to other
| files.
| | I am reasonably confident this functionality does not cause conflicts)
| |
| | When the form completes ok (great majority of occasions) and control
is
| | released back to the application there is a period of several seconds
when
| | the busy icon is visible and the pc 'catches up' with its 'housework'.
| |
| | I have 2 questions:
| | 1. Can the demands of a network 'intefere' with the running of a modal
| form?
| | For instance I know the network polls for emails every 30 minutes from
a
| | central point elsewhere.
| | 2. Should I be releasing control back to the application at various
stages
| | during completion of the form by liberally using DoEvents?
| |
| | T.I.A.
| |
| | Geoff
|
|
|


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DoEvents??


Use doevents to prevent hanging your system....

but use statics in your code to flag if the procces is already running
like this for a command button:


Code
-------------------
Static boolean AlreadyClicked

if Not Alreadyclicked
AlreadyClicked = true
'Do Your Stuff
Doevents
'do more stuff
Alreadyclicked = false
end i
-------------------

--
Dnere
-----------------------------------------------------------------------
Dnereb's Profile: http://www.excelforum.com/member.php...fo&userid=2618
View this thread: http://www.excelforum.com/showthread.php?threadid=39657



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
Doevents Application Alex J Excel Programming 1 November 30th 03 04:31 PM


All times are GMT +1. The time now is 04:45 PM.

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

About Us

"It's about Microsoft Excel"