+ Reply to Thread
Results 1 to 4 of 4

How to simplify code?

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    DR
    MS-Off Ver
    Excel 2010
    Posts
    14

    Question How to simplify code?

    Hi, guys!

    My userform freezes randomly when I press the button that contains an apparently "complicated" code.


    Please Login or Register  to view this content.
    Anyone knows how to make the simplier so it doesn't freeze randomly? Thank you for reading

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Simplifying the code won't necessaryily stop it freezing.

    You need to find out why it's freezing.

    The first thing you should do to help with that is remove On Error Resume Next, that could just be hiding problems.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-26-2013
    Location
    DR
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: How to simplify code?

    Quote Originally Posted by Norie View Post
    Simplifying the code won't necessaryily stop it freezing.

    You need to find out why it's freezing.

    The first thing you should do to help with that is remove On Error Resume Next, that could just be hiding problems.


    Thank you for your help

    The error handler is essential as I have 7 subcats and 6 periods, it will always give me an error there.

    The matter is that when I push the button it runs the whole code fine for X number of times and then it could freeze or it could just run fine everytime I push the button. It's really random.

    I've run the code on F8 and the merge thing is the part that is actually time consuming.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to simplify code?

    What errors do you need to handle?

    Perhaps they can be dealt with without using an all encompassing On Error... statement which will hide, sorry I mean cover, every error in the code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How can I simplify this code?
    By etuckram in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-26-2012, 05:04 AM
  2. simplify code
    By double a enterprises in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-05-2010, 05:42 AM
  3. Need to simplify code
    By alexwren in forum Excel General
    Replies: 7
    Last Post: 08-15-2006, 03:07 PM
  4. [SOLVED] Simplify Code
    By Soniya in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2006, 01:59 PM
  5. [SOLVED] simplify code
    By matt in forum Excel General
    Replies: 3
    Last Post: 09-28-2005, 07:05 PM

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