Thanks Hans
I seem to have missed out totally learning about the Object Explorer. I’m not too sure why. I don’t think I have ever hardly used it.
I do remember that early in my learning VBA, a few people said to me that you need to know what you want in order to look for what you want.
I can see their point: To get the information you showed… I had to have that information up in from of me already ( your screenshots) , and then I searched around until I found the same .
I can’t see any logic to how I would find that information from the Object Explorer, unless I had your screenshots in the first place.
Using the Object Explorer currently to me seems total un intuitive, it is totally lost on me
Just my usual ignorance or slowness to get the point, I guess.
_._____________________________________________-
HansV wrote:... Err is a function that returns an ErrObject...
……
Err is a function that returns an ErrObject……
I never heard that before. I think I need to remember that. I did see it at some point just now,
Function
Err() As
ErrObject
ErrFunctionAsObject.JPG : http://i.imgur.com/YBH9Lrq.jpg https://imgur.com/gpBpDDs" onclick="window.open(this.href);return false;
Finally after selecting
ErrObject , I get a similar screenshot to your final one
ErrObject.JPG : :
http://i.imgur.com/bKyNNPP.jpg https://imgur.com/qCdbGHL" onclick="window.open(this.href);return false;
If I look carefully at that last screen shot I see a small green dot,
(
you may need to click on the imgur link to get a better resolution - Look to the left of ‘_-Number in the Element von ‘ErrObject’ window)
- so I can see, as you mentioned, a way to find the default property. That is a similar thing to your
….. special icon …. That is also useful to know, thanks.
But I still see no way to navigate to this final point, without already having your screenshots to start with. So the Object Explorer is, unfortunately, lost on me.
I don’t think I have found a good Blog on the object explorer. But I should say I have never really looked for one yet...
But I think I am going to add that phrase …
Err is a function that returns an ErrObject… to a lot of my notes now. Thanks for that.
Or rather, I think I will substitute that for all the times I have written …
… Err is an object…. …
Instead of writing …
… Err is an object…. … , I will instead write …
Err is a function that returns an ErrObject…
That statement explains exactly why .._
Err
_.. does not fail . ……
It does not fail, because, somewhere, hidden internally in Excel , God only knows where, is something pseudo like
Function Err( ) As Object
If no Dot thing given…. Then Err is = the Err.Number
End Function
I expect it is a bit more complicated than that, but that explains why.._
Err
_.. does not fail: It is pseudo like a function call … and somehow that is wired to return the Property of .
Number by default
Code: Select all
Sub TestWaysToUseFunctionErr()
Call Err ' A way to use a Function
Err ' Another way to use a Function
Dim vTemp
Let vTemp = Err() ' Another way to use a Function
End Sub
Alan
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also