Question about the Excel object model

Caze982

Board Regular
Joined
May 10, 2015
Messages
77
Hi everyone

I am trying to learn about the Excel object model and i am bit confused the following code line:

Excel.Application.Selection.CurrentRegion.Select

In the object browser i can see that application is an child class and a property of Excel. I can also see the selection is a property of the application class. But how can i in the object browser see that currentRegion is a property of selection?

Sincerly
Christian
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
In that context Selection returns a Range object and CurrentRegion is a property of the Range object.
 
Upvote 0
Christian

CurrentRegion is a property of the Range object and it's more than likely Excel.Application.Selection is returning a Range object, if it isn't then you'll get a runtime error.
 
Upvote 0
Hi Norie

Thank you for your reply, do you know of a way where i can see that Excel.Application.Selection is returning a range object?
 
Upvote 0
Hi Kyle123

Thank you for your reply, do you know of a way where i can see that Excel.Application.Selection is returning a range object?
 
Upvote 0
You can only test that at runtime, since different things could be selected.
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,175
Members
452,615
Latest member
bogeys2birdies

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