Ignore DDE, IgnoreRemoteRequests - 16.0 changes

Scotster

Board Regular
Joined
May 29, 2017
Messages
59
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
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 :)
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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.
 
Upvote 0
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 :biggrin:

If it is indeed something wrong with the software then I would contact Microsoft to see if anything can be done about it :)
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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

Rich (BB 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 = [COLOR=#ff0000][B]True[/B][/COLOR]
 
Last edited:
Upvote 0
The IgnoreRemoteRequests Property should be set to TRUE not to FALSE

Code:
Application.IgnoreRemoteRequests = [COLOR=#ff0000][B]True[/B][/COLOR]

Apologies, I meant true haha. Was just typing it off the top of my head.
 
Upvote 0
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:
Upvote 0
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:
Upvote 0
Apologies for bumping an old thread but as much as my workaround solved my issue previously, I'm wondering if there is a more elegant fix that people know of to get around this seemingly not working. We're using sharepoint quite a bit now and previous workarounds with shortcuts etc no longer apply.

Summary:
Code:
Application.IgnoreRemoteRequests = true

With one workbook open and this flag set (checked with the DDE option in Excel), opening any other excel file by double clicking on it still opens up in this instance of Excel. I want this instance to be ignored by other file openings.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top