Consulting

Results 1 to 6 of 6

Thread: Application remote request

  1. #1
    VBAX Regular
    Joined
    Feb 2008
    Posts
    32
    Location

    Application remote request

    Hello to all

    Great forum. I am somewhat new to vb and would like to post a question. After searching high and low, I have been unsuccessful in finding out the best way to use multiple instances of excel. I would like to use a vba form at the same time seperate excel applications are running.

    application.remoterequests = false seems to be the best option. My only concern is if/when there might be a fatal error and remoterequests hasn't been set back to true.

    Is there some way to trap errors and switch remoterequests back to true if fatal error should occur ?

    Thank you for your time.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Why do you need separate instances? I cannot see any reason for it.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Feb 2008
    Posts
    32
    Location
    Hello xld and thank you for your reply.

    I put together a form used by myself and others I work with. Every so often, my coworkers aren't able to access Excel. I'm thinking that somehow a fatal error occurred because I find that Ingore Applications is checked in their options. So it seems that the form didn't have a chance to be set back to true.

    Here is the code I currently use on open:

    [VBA]


    Private Sub Workbook_Open()

    Parent.Application.Visible = False
    Parent.Application.DisplayAlerts = False
    Application.IgnoreRemoteRequests = False

    Call OPENFORM

    End Sub

    [/VBA]


    Here is the code I use on close:

    [VBA]

    Private Sub UserForm_QueryClose _
    (Cancel As Integer, CloseMode As Integer)

    If CloseMode = vbFormControlMenu Then

    Application.DisplayAlerts = False

    Application.IgnoreRemoteRequests = False

    Workbooks("NiseEngineering.xls").Close SaveChanges:=False
    Cancel = False

    End If

    Application.Quit

    End Sub

    [/VBA]

  4. #4
    VBAX Regular
    Joined
    Feb 2008
    Posts
    32
    Location


    Help please. Is there anyway to see fatal errors and switch ignore remote request back to true ?


  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I personally think this is a bad idea, but if you have proper error handling you can reset it there.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    VBAX Regular
    Joined
    Feb 2008
    Posts
    32
    Location
    Thanks xld.

    Could you possibly give me an example?

Posting Permissions

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