If you have used VBA for any length of time you will have seen a syntax error.When you type a line and press return, VBA will evaluate the syntax and if it is not correct it will display an error message.Then on another sheet I summarize all entered invoices with a pivotable (sheet "rpt_LSGD"). Value = a 'Xoa form phan cong nhiem vu Sheets("frm Phan Cong Nh Vu"). Clear Contents 'Chuyen sang form phan cong nhiem vu Sheets("frm Phan Cong Nh Vu"). Select Else 'Neu da phan cong thi nhap du lieu cu vao form phan cong For Each b In Sheets("frm Phan Cong Nh Vu"). I use the event Before Double Click in sheet "rpt_LSGD" to bring user to different sheets depending on where they click to facilitate navigation. Protect Password:="forsce15" End With Call lay Th Tin Bien Nhan 'This sub entered all invoice data previously entered into the user form Sheets("frm Bien Nhan"). Select Case Is 0 'Copy ma bien nhan sang sheet phan cong nhiem vu a = Active Cell. I find it hard to believe because I have a quad-core Core i7 processor operating at 2.6 GHz. In my workbook, I have an input form on a separate sheet to enter invoices into database (sheet "frm Bien Nhan"). Value = a 'Xoa form phan cong nhiem vu Sheets("frm Phan Cong Nh Vu"). Clear Contents 'Kiem tra xem bien nhan hien tai da duoc phan cong hay chua If Sheets("frm Phan Cong Nh Vu"). Value = "N/A" Then 'Neu chua phan cong thi chuyen sang sheet phan cong Sheets("frm Phan Cong Nh Vu").
If this file gets deleted then VBA will display an error when your code tries to open it.
For all other errors we use generic code to deal with them.
This is where the VBA error handling statement comes into play.
They allow our application to deal gracefully with any errors we weren’t expecting.
To understand error handling we must first understand the different types of errors in VBA.