Consulting

Results 1 to 4 of 4

Thread: Waiting for PDF to load

  1. #1

    Question Waiting for PDF to load

    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.

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


    txtDRMM.SetFocus
    [/vba]
    Any ideas?

  2. #2
    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?
    Boyd Trimmell aka HiTechCoach
    Microsoft Access MVP -2010-2015

    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    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?

  4. #4
    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.
    Boyd Trimmell aka HiTechCoach
    Microsoft Access MVP -2010-2015

    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •