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.
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.
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)?
CIao,![]()
'Private Sub CommandButton1_Click() Sub RemoveInvalidData() Dim lRw As Long, sFormula As String, sStRw As String, sCol As String '...
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
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
There are currently 2 users browsing this thread. (0 members and 2 guests)
Bookmarks