VBA code for switching view back to Excel from Acrobat after PDF creation

jardenp

Active Member
Joined
May 12, 2009
Messages
373
Office Version
  1. 2019
  2. 2016
  3. 2013
  4. 2011
  5. 2010
Platform
  1. Windows
As part of my macro, I save the worksheet as a PDF and have it leave the resulting Acrobat window open for future use by the user. However, I need it to switch the viewed window back to Excel because I do other things to the Excel workbook and want those results to be visible. I know how to get the code to switch back to acting on the Excel workbook, so this is an issue of which window is visible on the screen. Any suggestions?

Thanks!

JP in IN
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Look to use SEND KEYS this should handle switching windows.
 
Upvote 0
Sorry for the late reply. Thanks for the suggestion. I'm hesitant to do that because it can't specifically call up the excel window and I'd hate to have it go awry and try to execute code on the wrong thing. However, I have no other alternative, so I may give it a go.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,214,544
Messages
6,120,126
Members
448,947
Latest member
test111

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