+ Reply to Thread
Results 1 to 2 of 2

Macro has started crashing workbook

  1. #1
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    667

    Macro has started crashing workbook

    This macro causes my Workbook to stop working and excel to search for fix.
    Is there anything you see that might be the culprit?
    I have it stored on my Personal.XLSB and run it on the open workbook.
    There is no error message before the crash. AND it just recently started happening - previous to yesterday it worked flawlessly.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Macro has started crashing workbook

    Hi CRIMEDOG,

    It looks good to me, except that there is no Dim statement for wsSheet. Try adding
    Please Login or Register  to view this content.
    It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
    Please Login or Register  to view this content.
    This option requires all variables to be declared and will give a compiler error for undeclared variables.

    Lewis

+ 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. Macro to Copy Sheets and Save As New Workbook Crashing Excel
    By JamieAtJack in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2012, 08:19 PM
  2. "personal macro workbook" not loaded when Excel started by other program
    By nleahcim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2012, 02:46 AM
  3. Workbook started running very slow
    By bowhunt24 in forum Excel General
    Replies: 3
    Last Post: 11-16-2011, 12:58 PM
  4. Excel 2007 : very complex workbook keeps crashing
    By katja328 in forum Excel General
    Replies: 0
    Last Post: 10-22-2009, 05:56 PM
  5. Excel 2007 : Shared workbook crashing
    By dimitrz in forum Excel General
    Replies: 1
    Last Post: 10-06-2009, 04:43 AM

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