Results 1 to 9 of 9

Thread: Ignore DDE, IgnoreRemoteRequests - 16.0 changes
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    May 2017
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    Hi there,

    I'm wondering if anyone else uses the ignore DDE option the same way as I did, and have found a workaround to the issue I am facing, or if anyone can simply help with a solution/workaround.

    Previously when I checked the Ignore DDE option or used Application.IgnoreRemoteRequests = True, any time I opened an excel file it would open in a separate instance of Excel. Now, it opens up in the current instance.

    This is an issue for me as I have a small program/userform that I use and have always kept separate. I do this by hiding the application on open, displaying the Userform and ignoringremoterequests. This means that any time I open any other Excel file it opens up in a separate instance and leaves my program happily running at the side.

    Since the 16.0 upgrade (Office 365) this no longer functions this way. Ignoring DDE seems to have absolutely zero impact and now when I open a file it opens in the same instance of Excel, unhiding my hidden instance and leaving me with no option but to kill my open userform.

    Is there any way to actually separate the instance with v16 so that it opens any subsequent files in a new instance?

    FWIW we only have office 365 on our Win10 machines, our Win7 Machines are still on 14.0 and all work flawlessly with the code I have. I noticed quite a few changes since the update in the way that previous functionality seems to have disappeared.

    Any help would be greatly appreciated

  2. #2
    Board Regular Jaafar Tribak's Avatar
    Join Date
    Dec 2002
    Location
    Larache--Morocco
    Posts
    7,351
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    3 Thread(s)

    Default Re: Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    Was it you who asked a similar question here before ?

    One workaround that might slightly work is by hooking the excel events at the application level. The code would reside inside an addin so that when your small program opens, the addin would detect it and check if there are any other workbooks already open in the current excel session and if so, close the program and reopen it in a seperate instance.

    If on the other hand the small program is open and then the user tries opening another workbook, the addin would do a similar check to ensure the small program is left running in its own seperate instance. (This step may require more code)

    Sure this is not an elegant fix but might work in your specific situation.
    Office/Excel 2010 64Bits -- Win10 64Bits

    Common sense is not so common.


    http://photo-larache.blogspot.com/

  3. #3
    New Member
    Join Date
    May 2017
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    Quote Originally Posted by Jaafar Tribak View Post
    Was it you who asked a similar question here before ?

    One workaround that might slightly work is by hooking the excel events at the application level. The code would reside inside an addin so that when your small program opens, the addin would detect it and check if there are any other workbooks already open in the current excel session and if so, close the program and reopen it in a seperate instance.

    If on the other hand the small program is open and then the user tries opening another workbook, the addin would do a similar check to ensure the small program is left running in its own seperate instance. (This step may require more code)

    Sure this is not an elegant fix but might work in your specific situation.
    I've asked a similar question in the past but we just had a very recent office update and it's completely killed the feature altogether. I'm trying to figure out if it's a bug/loss of functionality with the software that hasn't been noticed..... or if the effects of ignoring DDE were simply coincidental before.

    I can play with the Open event but I have loads of stuff that uses this in work. We are currently migrating to Win10 which is when all hell is going to break loose with my automated code

    If it is indeed something wrong with the software then I would contact Microsoft to see if anything can be done about it

  4. #4
    Board Regular Jaafar Tribak's Avatar
    Join Date
    Dec 2002
    Location
    Larache--Morocco
    Posts
    7,351
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    3 Thread(s)

    Default Re: Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    Quote Originally Posted by Scotster View Post
    I'm trying to figure out if it's a bug/loss of functionality with the software that hasn't been noticed..... or if the effects of ignoring DDE were simply coincidental before.
    Hi Scotster,
    I really don't know the answer... I use excel 2016 and IgnoreRemoteRequests works as expected.

    You can also launch your workbook program from a small vbs file that may also work for you.

    Regards.
    Office/Excel 2010 64Bits -- Win10 64Bits

    Common sense is not so common.


    http://photo-larache.blogspot.com/

  5. #5
    New Member
    Join Date
    May 2017
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    Quote Originally Posted by Jaafar Tribak View Post
    Hi Scotster,
    I really don't know the answer... I use excel 2016 and IgnoreRemoteRequests works as expected.

    You can also launch your workbook program from a small vbs file that may also work for you.

    Regards.

    Hmm, that's very interesting. Out of curiosity could you try this and let me know if it works (Just in case I'm doing something wrong)

    Under Workbook

    Code:
    Private Sub Workbook_Open()
     Application.DisplayAlerts = False
     Application.Visible = False
     Application.IgnoreRemoteRequests = False
    End Sub
    F5 it to fire it and then open up any other Excel file.

    For me, it not only un-hides the application but also opens it in the same instance.

  6. #6
    Board Regular Jaafar Tribak's Avatar
    Join Date
    Dec 2002
    Location
    Larache--Morocco
    Posts
    7,351
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    3 Thread(s)

    Default Re: Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    Quote Originally Posted by Scotster View Post
    Hmm, that's very interesting. Out of curiosity could you try this and let me know if it works (Just in case I'm doing something wrong)

    Under Workbook

    Code:
    Private Sub Workbook_Open()
     Application.DisplayAlerts = False
     Application.Visible = False
     Application.IgnoreRemoteRequests = False
    End Sub
    F5 it to fire it and then open up any other Excel file.

    For me, it not only un-hides the application but also opens it in the same instance.
    The IgnoreRemoteRequests Property should be set to TRUE not to FALSE

    Code:
    Application.IgnoreRemoteRequests = True
    Last edited by Jaafar Tribak; Sep 23rd, 2019 at 04:58 AM.
    Office/Excel 2010 64Bits -- Win10 64Bits

    Common sense is not so common.


    http://photo-larache.blogspot.com/

  7. #7
    New Member
    Join Date
    May 2017
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    Quote Originally Posted by Jaafar Tribak View Post
    The IgnoreRemoteRequests Property should be set to TRUE not to FALSE

    Code:
    Application.IgnoreRemoteRequests = True
    Apologies, I meant true haha. Was just typing it off the top of my head.

  8. #8
    New Member
    Join Date
    May 2017
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    I've managed to find a way around this but I still think there's a bug with the software. My solution is to use a second WB to open the primary one using the excel object. I create a new excel application object, use that to open the primary file before closing and it works absolutely fine, just as expected.

    Opening the file on its own results in the application becoming visible and the "ignoring" being ignored.
    Last edited by Scotster; Oct 2nd, 2019 at 12:23 PM.

  9. #9
    New Member
    Join Date
    May 2017
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Ignore DDE, IgnoreRemoteRequests - 16.0 changes

    Here is a tester that works to showcase the issue and solution (if you also have the same problem)

    New workbook, inside the Workbook code..

    Code:
    Private Sub Workbook_Open()    
    Application.IgnoreRemoteRequests = True
        Application.Visible = False
        Test.Show
    End Sub
    Create a "Test" userform with a Command Button


    Code:
    Private Sub CommandButton1_Click()    
    Application.OnTime Now + TimeSerial(0, 0, 1), "Open_SezMe"
        Unload Me
    End Sub
    
    
    Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
        If CloseMode = 0 Then
            Application.DisplayAlerts = False
            Application.Quit
        End If
    End Sub
    Create a module with the following functions

    Code:
    Function Open_Link(StrPath, oNew)
    Dim objExcel
    Dim objWorkbook
    
    
        If oNew = True Then
            Application.DisplayAlerts = False
            Set objExcel = CreateObject("Excel.Application")
            objExcel.Visible = True
            Set objWorkbook = objExcel.Workbooks.Open(StrPath)
            Set objExcel = Nothing
            Set objWorkbook = Nothing
        Else
            CreateObject("Shell.Application").Open CStr(StrPath)
        End If
    
    
    End Function
    
    
    Function Open_SezMe()
        Application.WindowState = xlMaximized
        Application.Visible = False
        Application.DisplayAlerts = False
        Application.IgnoreRemoteRequests = True
        ThisWorkbook.ChangeFileAccess xlReadOnly
        addy = ThisWorkbook.FullName
        Open_Link addy, True
        Application.IgnoreRemoteRequests = False
        Application.Visible = True
        ThisWorkbook.Close False
    End Function

    When the file opens, attempting to open another excel file fails due to trying to open up in the same instance with a modal userform in place. This is normally mitigated using the "ignoreRemoteRequests" command, but this (as per my issue) is being ignored. In order to have it work as it should, click the button. It will re-open the file using the Excel Application Object, after which the "IngoreRemoteRequests" works as expected. Opening another Excel file will open in a new instance, leaving this particular little program alone.

    This is exactly what I've had to do to get my program to run as expected. Have a 3rd party file use the above method to open the file I want exclusive.
    Last edited by Scotster; Oct 2nd, 2019 at 12:57 PM.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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