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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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,215,840
Messages
6,127,217
Members
449,370
Latest member
kaiuuu

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