Displaying all Properties of an object

T

Thomas Wiedmann

Hello,

how can the current values of all properties of an object, e. g. of
Range.Font, be displayed?

Thomas Wiedmann
 
S

Stefan Blom

Not sure what you have in mind, but here is one possibility: Set a variable to the range object that you are interested. Then halt execution of the macro, after which you can look at the object's properties in the Locals window of the Visual Basic Editor. For example:

Sub testmacro()
Dim r As Range
Set r = Selection.Range
Stop
End Sub

Stefan Blom
Microsoft Word MVP



"Thomas Wiedmann" wrote in message
Hello,

how can the current values of all properties of an object, e. g. of
Range.Font, be displayed?

Thomas Wiedmann
 
T

Thomas Wiedmann

... Then halt execution of the macro, after which you can look at the
object's properties in the Locals window of the Visual Basic Editor. ...

Thanks - the keyword 'Locals window' was the crucial hint, I've searched
for, to display the object properties; I didn't use the local window so far.

Thomas Wiedmann
 
S

Stefan Blom

It would certainly make more sense if the window was called the "Variables window" or something similar. :)

Stefan Blom
Microsoft Word MVP



"Thomas Wiedmann" wrote in message
... Then halt execution of the macro, after which you can look at the
object's properties in the Locals window of the Visual Basic Editor. ...

Thanks - the keyword 'Locals window' was the crucial hint, I've searched
for, to display the object properties; I didn't use the local window so far.

Thomas Wiedmann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top