+ Reply to Thread
Results 1 to 5 of 5

debug by step (F8) vs running entire sub

  1. #1
    Registered User
    Join Date
    05-03-2012
    Location
    phoenix,az
    MS-Off Ver
    Excel 2003
    Posts
    2

    debug by step (F8) vs running entire sub

    I have a simple sub that prints to a .pdf file.
    If I step thru using F8, I get the results I want (a .pdf file with actual data)
    When I run the subroutine I get a .pdf file with 0 bytes of data.

    I appreciate any help.

  2. #2
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: debug by step (F8) vs running entire sub

    Not know what your code is doing...

    My first impression is that when you are stepping through the code you are allowing time for all the processing to be completed... my want to try adding a:

    Doevents()

    To your code to yield control to the process creating the pdf.
    Ted
    "Live Long and Prosper"

  3. #3
    Registered User
    Join Date
    05-03-2012
    Location
    phoenix,az
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: debug by step (F8) vs running entire sub

    I've tried using Wait method to pause code between creation of pdf and printing but I get the same results - a pdf file with 0 bytes.

  4. #4
    Registered User
    Join Date
    07-06-2011
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: debug by step (F8) vs running entire sub

    Without knowing what you are doing, this is just a guess. What about slowing it down between your calculation routine and the PDF creation? It seems to me that might be where you have the processing lag. Or are you just creating a PDF from static data?

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: debug by step (F8) vs running entire sub

    Post the code and that will eliminate some of the guesswork.
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1