I am reading how to use On Error Resume Next , and I am trying to figure out how long this line will be applied to the program. I found this sentence on the Microsoft website: "The On Error Resume Next operation becomes inactive when another procedure is called." What exactly does this mean? What is considered a procedure?
I ask because I use a line in my program, but I do not want her Resume Next execute all runtime errors, only obvious on the next line.
Code: Dim zRange As Range
Call FilterTableFor(fieldNameColumn, Array("baseunitprice", "burden", "MTLBURRATE", "PurPoint", "Vendornum")) On Error Resume Next Set zRange = commentsColumnRange.SpecialCells(xlCellTypeVisible) zRange.Formula = "target" Call FilterTableFor(fieldNameColumn)
I also found (and have known for some time) that On Error or GoTo strings are considered bad encoding. Is there a Try-Catch that I can use for such a string?
I think something like this:
Dim zRange As Range Call FilterTableFor(fieldNameColumn, Array("baseunitprice", "burden", "MTLBURRATE", "PurPoint", "Vendornum")) Try Set zRange = commentsColumnRange.SpecialCells(xlCellTypeVisible) zRange.Formula = "target" Catch() Call FilterTableFor(fieldNameColumn)
Where I don’t even do anything with it, because I don’t feel the need.
Thank you for your time.
source share