1 of 1 people found this helpful
I tried your code and in my environment, it works fine. (Could close the user form and opened the different display)
What kind of error did you get? Could you share the screen shot of the error?
If you move Unload Me to above instead of the last like following, what will happen?
strCurrentPath = Left(ThisDisplay.Path, (InStrRev(ThisDisplay.Path, "\")))
strFileNameAndPath = strCurrentPath & "Eastern Ridge Server Deep Dive.PDI"
Call Application.Displays.Open(strFileNameAndPath, True)
I'll have to get back to you on what exactly has gone wrong. There is no error but for some reason it takes a full couple of minutes to load so I'm thinking there is something else going on. However when I put Unload Me to the top of the Sub like you suggested it works fine