+ Reply to Thread
Results 1 to 6 of 6

Alternative and faster code

  1. #1
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Alternative and faster code

    Hi!

    Does someone know an alternative or maybe faster way of running the code bellow?
    This code runs when changing the value from a dropdown list in a userform.


    Please Login or Register  to view this content.


    Thank you very much.

    Kind regards,

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Alternative and faster code

    Hi,

    It's rather difficult to comment without seeing the macro in the context of its workbook.

    Upload the workbook with a brief description of any inputs required and the ultimate goal. i.e. don't tell us what the macro is doing tell us in simple general terms what you want to happen.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Alternative and faster code

    It doesn't seem the code would take long to complete as it only changes the values in 15 cells.

    Is the L2_Click procedure changing the Lista3 values. This could cause an unintended self-propagating loop between the two controls.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Alternative and faster code

    Hello,

    First of all, thanks for the replies.

    I tried to simplify the workbook (to make it smaller and attach it) and discover that since then the code was running nice and fast without flickering. I guess is not the code whats is slowing down but yes the whole information around it. Actually, the code itself in its original workbook does not take too long (1 or 2 sec) but it flickers while running and that's what I would like to avoid (the screen does not flickers, only the pointer). I thought that the code: "Application.ScreenUpdating = False" will avoid this but it doesn't.

    Kind regards,

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Alternative and faster code

    This may help a little. Then again, it may not. The pointer flickering may be from clearing the six "A" controls.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Alternative and faster code

    AlphaFrog that was excellent! Its now working nice and neatly!!

    Thanks a lot, I really appreciate your help!!

    Regards,

    pezalmendra

+ 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