+ Reply to Thread
Results 1 to 5 of 5

DoEvents??

  1. #1
    Geoff
    Guest

    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. #2
    Jim Rech
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    |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. #3
    Geoff
    Guest

    Re: 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" <[email protected]> wrote in message
    > news:[email protected]...
    > |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. #4
    Jim Rech
    Guest

    Re: DoEvents??

    >>I'm clutching at straws.

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

    --
    Jim
    "Geoff" <[email protected]> wrote in message
    news:[email protected]...
    | 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" <[email protected]> wrote in message
    | > news:[email protected]...
    | > |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. #5
    Registered User
    Join Date
    08-11-2005
    Location
    Netherlands Waddinxveen
    Posts
    81
    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:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1