+ Reply to Thread
Results 1 to 3 of 3

Microsoft Excel Stopped Working Error

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2017
    Posts
    300

    Microsoft Excel Stopped Working Error

    I have a Macro button in my Excel Spreadsheet, everytime I close the spreadsheet it gives me this error "Microsoft Excel Stopped Working"
    I have attached Spreadsheet to show example.

    Please help.
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Microsoft Excel Stopped Working Error

    Hi, Fredbugatti,

    when I disabled the first code line there was no error with my Excel2013. What version of Excel do you use (you mention 2003 in your profile)?

    'Private Sub CommandButton1_Click()
    
    Sub RemoveInvalidData()
    Dim lRw As Long, sFormula As String, sStRw As String, sCol As String
    '...
    CIao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Microsoft Excel Stopped Working Error

    Works for me in 2007.

    One error/mistake is that sFormula is an R1C1 type formula but you insert it as a A1 type formula.

    sFormula = "=if(RC[1]>50,row(),false)"
    
    With Range(sCol & sStRw + 1 & ":" & sCol & lRw)
        .Formula = sFormula
        .Value = .Value
    End With

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Errors: Microsoft Excel has stopped working - crash in pivot table
    By EvaLina in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-12-2014, 09:58 AM
  2. Microsoft Excel has stopped working.
    By Miramar in forum Excel General
    Replies: 15
    Last Post: 08-22-2013, 03:02 AM
  3. Replies: 2
    Last Post: 06-10-2013, 06:18 PM
  4. MSNStockQuote function stopped working - but only for the Microsoft ticker symbol
    By y2kcrackers2989 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-21-2012, 01:45 PM
  5. Microsoft Excel has stopped working.Windows is checking for a solution to the program
    By amarendra19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2011, 02:07 AM

Tags for this Thread

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