PDA

View Full Version : Waiting for PDF to load



fourclicks
05-18-2012, 10:02 AM
Hello, hoping you guys can help. I think it may be real simple.

This code loads a PDF into the form, and it takes up to a second to load.

I want the "OK" button to be in focus, but usually the PDF finishes loading after the message box appears and takes the focus.

The only work around I could think of was "Me.Wait (1)" which is just not a good way about it.


wb1.Navigate filname
Me.Wait (1)
MsgBox "Please update the Date Received.", vbOKOnly + vbSystemModal + vbDefaultButton1


txtDRMM.SetFocus

Any ideas?

HiTechCoach
05-20-2012, 01:46 PM
Are you using Adobe Acrobat to view the PDF? Unfortunately it is very slow loading.

What control are you using on the form to display the PDF?

fourclicks
05-21-2012, 08:45 AM
Well, I did not originally create the code, but I am learning VBA as I go.


The form object's class is Shell.Explorer.2, if that helps, and it does load with Adobe Acrobat.

Is there something other info specifically I could give you that would help more?

HiTechCoach
05-21-2012, 04:47 PM
You speed issue is Adobe Acrobat. it is well know to be very slow to load.

I use Nitro Reader. There is a free and Pro versions. It loads a lot faster that Adobe's.