list all members of an object - vba

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
Inside vba editor when I type

range.

then vba will list all the members of range, but when I type this

workbooks(1).worksheets(1).range.

nothing will be listed? can I force vba to list all members, anytime?

Thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
If you have Auto-List Members enabled (Tools -> Options -> Auto List members), then you are about at the extent of what VBA will do for you.

You there are two easy ways to view your options, I will use your example.

1.) You can store it as a reference variable:

Code:
Dim newRng As Range
Set newRng = workbooks(1).worksheets(1).range

At this point you could type "newRng." and the period would trigger the list of range members to appear.

OR

2.) You can check the object browser

Either press "F2" or navigate to the object browser via the menu (View -> Object Browser)
Then find "range" in the "Classes" list and select it.
The available options will appear to the right.

(You can display hidden options by right-clicking in object browser and selecting "show hidden members"
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top