Export To Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Have a function that checks for and open copy of Excel using

Set objXLS = GetObject(, "Excel.Application")

this works great if excel is open. The problem is if the print preview is
open in Excel, Excel goes into a never ending loop with a error window
flickering on the screen. Is there a way to check if the print preview is
open to prevent user from getiing stuck in an error loop?
 
It strikes me this could be a tricky one. If Excel does not respond to
automation requests when in print preview, you can't get hold of it in
order to ask it whether it's in print preview. In any case there doesn't
seem to be a property in the Excel object model that can be interrogated
to learn whether something is being previewed.

All I can suggest is that you ask in the Excel programming newsgroup
where the real Excel experts will see it.
 
Back
Top