vba excel built-in object question

msqrd1979

New Member
Joined
Jul 17, 2009
Messages
1
All-

When I type Worksheets("Sheet1") into the vba ide editor the intelisense shows "_Default(Index) as Object". My question for everyone is if worksheets are built-in objects then why can't you drill into built-in objects and get intelisense help.

For example, we all know the Range object exists off the worksheets object. However, if you type Worksheets("Sheet1"). and you would expect intelisense to popup with list objects off worksheets object so you can find range object. However, the ide does not do that.

The only way I have been working around this issue is dimming a variable as worksheet then doing the variablename. and the intelisense works like a charm. I am guessing that is because it is using early binding.

Can anyone tell me why the built-in objects do not work like local objects or is this behavior by design?

TIA,
msqrd1979
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
You will notice from what you posted that the Item method of the Worksheets collection returns an Object, not a Worksheet. That's why you don't get Intellisense. (Why it returns an Object I don't know; I can understand it with the Sheets collection since that could return a worksheet, chart sheet or macro sheet)
 
Upvote 0

Forum statistics

Threads
1,214,638
Messages
6,120,674
Members
448,977
Latest member
moonlight6

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