av8tordude
05-26-2011, 11:06 AM
How can I bypass the code highlighted in red if the frmReceipt was not called?
Range("Expense").Cells(Table, 1) = Application.Max(Range("AU11:AU500")) + 1
Range("Expense").Cells(Table, 2) = CDate(Date5)
Range("Expense").Cells(Table, 3) = cboCat.Value
Range("Expense").Cells(Table, 4) = cboDesc.Value
Range("Expense").Cells(Table, 5) = CCur(Amnt)
Range("Expense").Cells(Table, 6) = frmReceipt.txtReceipt.Value
Range("Expense").Cells(Table, 7) = frmReceipt.txtName.Value
Range("Expense").Cells(Table, 8) = frmReceipt.txtCity.Value & ", " & frmReceipt.txtState.Value
Range("Expense").Cells(Table, 9) = Format(frmComp.Comp, "$0.00")
Range("Expense").Cells(Table, 1) = Application.Max(Range("AU11:AU500")) + 1
Range("Expense").Cells(Table, 2) = CDate(Date5)
Range("Expense").Cells(Table, 3) = cboCat.Value
Range("Expense").Cells(Table, 4) = cboDesc.Value
Range("Expense").Cells(Table, 5) = CCur(Amnt)
Range("Expense").Cells(Table, 6) = frmReceipt.txtReceipt.Value
Range("Expense").Cells(Table, 7) = frmReceipt.txtName.Value
Range("Expense").Cells(Table, 8) = frmReceipt.txtCity.Value & ", " & frmReceipt.txtState.Value
Range("Expense").Cells(Table, 9) = Format(frmComp.Comp, "$0.00")