Greetings all,
I have an Excel workbook with an embedded PDF.
I have created a macro that will open that PDF (see below).
The problem I am having is that the macro is initiated from a single worksheet in the Excel workbook, but the embedded file is on a different worksheet which is normally hidden. Sometimes the PDF opens and the file is brought to the foreground as I would like. Sometimes, the macro opens the PDF but the file is the background.
I would like to force it to the foreground if I can.
Appreciate any help.
Regards,
Steve
I have an Excel workbook with an embedded PDF.
I have created a macro that will open that PDF (see below).
VBA Code:
Sub getstarted()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
On Error Resume Next
Sheet5.OLEObjects("getting_started").Verb xlVerbOpen ' Open the PDF file embedded in Sheet5
Application.DisplayAlerts = True
Sheet16.Activate ' Force return to Sheet16
End Sub
The problem I am having is that the macro is initiated from a single worksheet in the Excel workbook, but the embedded file is on a different worksheet which is normally hidden. Sometimes the PDF opens and the file is brought to the foreground as I would like. Sometimes, the macro opens the PDF but the file is the background.
I would like to force it to the foreground if I can.
Appreciate any help.
Regards,
Steve