+ Reply to Thread
Results 1 to 10 of 10

VBA Code running very slow. Need help

  1. #1
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    VBA Code running very slow. Need help

    Folks,

    The attached file is working well but very slow. Can you please someone advise how I can make these codes run fast.

    Thanks in advance.
    Joshi
    Attached Files Attached Files
    Cheers,

    Joshi
    Being with a winner makes you a winner

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VBA Code running very slow. Need help

    You have the code password protected.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA Code running very slow. Need help

    Hi Mike,

    Sorry.. Unprotected workbook attached. Thanks in advance.

    Joshi
    Attached Files Attached Files

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VBA Code running very slow. Need help

    Also what is running slow? Which code? And give some details to as how to run your forms?

  5. #5
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA Code running very slow. Need help

    Hi Mike,
    If I hit any button in the userform, its taking too much time to execute.

    Thanks in advance.

    Joshi

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520
    There a bunch of textboxes, comboboxes. Explain how the program is to flow. I'm sure you just don't open the form and hit a button?

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Code running very slow. Need help

    Hi Joshi

    It's my experience that Printing Worksheets or Creating PDF's of Worksheets are inherently slow(er) processes.

    The Single Report Buttons appear to work as expected...no observable, unexpected delay.

    The All Report Buttons also appear to work as expected...the delay is the number of records being processed...2339 in your sample file. Now I've not timed these processes as I've no desire to print 2339 reports or create 2339 PDF files.

    The best I can suggest...start the Code...have a smoke or a cup of coffee...let it run.
    You might consider breaking it up into smaller selections...though I don't know what this buys you if you want them all.

    PS: A late thought...you could do Multi Select on the All Buttons such that you Print/PDF only those you want...If you TRULY want them all...well...have a smoke or coffee...make certain you have adequate paper in the printer...
    Last edited by jaslake; 03-07-2013 at 07:48 PM.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Code running very slow. Need help

    Hi Joshi

    I found some Code today that might make your situation a bit more palatable...it's called Excel4Macro pSetUp. Let me play with it a bit...see if it helps.

  9. #9
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA Code running very slow. Need help

    Hi John,

    Any updates?

    thanks,
    Joshi

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Code running very slow. Need help

    Hi Joshi

    Sorry, no...could not find anything.

+ 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