So I just learned that if you type VBA. this will activate an auto list that includes VBA functions. Does this mean that VBA is an object? If I want to “fully qualify” using a VBA function, what would those qualifiers be?
For example, would these all be valid statements:
x = Sqr(25) x = VBA.Sqr(25) x = Application.VBA.Sqr(25)
Thanks for the clarification.
If you don’t qualify, the default is that VBA assumes it is a VBA function. If you want to use a worksheet function in VBA, then use something like:
x = Application.WorksheetFunction.VLookup(Range("A1").Value, Range("B1:C100"), 1, False)
It is REALLY important to qualify if you use a function like
TRIM() because the VBA version and the worksheet version have different results.