![]() |
Excel Error Reports and Unexpected Termination of Program
I am a novice VBA programmer, and I am struggling. Excel has been
generating error reports, and shutting down. On other occasions, when I attempt to save the file, the progress bar will indicate about 9/10 of the file saved, and then it will suddenly quit with no file being created, or any error messages. On other occasions, Excel will shut down on opening with no error. Errors appear to be generated at random, but most frequently when I click on a button (on a chart), to which I have assigned the "FormTemp" macro. I have attached my code. Any thoughts on what could be causing these errors? Thank you in advance. Chris Sub FormTemp() InitializeForm UserForm1.TextBox1 = Format([SDate], "Short Date") UserForm1.TextBox2 = Format([Qi], "#####0.0") UserForm1.TextBox3 = Format([Di], "##0.0 %") UserForm1.Show End Sub Sub AcceptDeclineInfo() tempfd = [PasteSheet] With Sheets(tempfd) .Cells([PasteRow], [PasteCol]) = [SDate] .Cells([PasteRow] + 1, [PasteCol]) = [Qi] .Cells([PasteRow] + 2, [PasteCol]) = [Di] End With End Sub Sub InitializeForm() [SDate] = [cSDate]: [Di] = [cDi]: [Qi] = [cQi] End Sub |
All times are GMT +1. The time now is 05:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com