The Object Browser

The Object Browser is a valuable tool for discovering the properties, methods, and events applicable to Excel objects. To display the Object Browser, you need to be in the VBE window. You can use View O Object Browser, press F2, or click the Object Browser button on the Standard toolbar to see the window shown in Figure 1-18.

The objects are listed in the window with the title Classes. Objects are instances of classes. You can click in this window and type an r to get quickly to the Range object.

Alternatively, you can click in the search box, second from the top with the binoculars to its right, and type in range. When you press Enter or click the binoculars, you will see a list of items containing this text. When you click Range, under the Class heading in the Search Results window, Range will be highlighted in the Classes window below. This technique is handy when you are searching for information on a specific property, method, or event.

y? Object Browser

■=■?.. ea

tAJI Libraries^ í ®¡] ^

range v í

I S eardi Results

| Library




lift Escel

¡2} AllowEditRanoes

illft. Excel

2J Range

Escel Excel

S! Ranges Si ShapeRange



Members of Range

Kl PublisnObJeets 'A Si QueryTablE

id1 DlrectPrecedert? á1 End


¡3 QueryTabies

B? triiifeC o-lumi"


là? EntireRow

[*J Rannoe


PrQpertv EirtreCoiumn As k\vih; Mertiber of EjiceJ ttan-r

You now have a list of all the properties, methods, and events (if applicable) for this object, sorted alphabetically. If you right-click this list, you can choose Group Members to separate the properties, methods, and events, which makes it easier to read. If you scan through this list, you will see the EntireColumn and EntireRow properties, which look to be likely candidates for your requirements. To confirm this, select EntireColumn and click the question mark icon at the top of the Object Browser window to go to the window in Figure 1-19.

** Eicel Htlp

► ■ '■«' * & ô -3

• P Search -

Table of Contents X

., ■ V. ■ M * WBE


Stertert ^ What's r|E ■■ ^vCtnteptE

EntireColumn Property

yf t?:cEl ObjErt MndEl ilEfErEno;

yt i'l CTGruft GrarJi ^sugl Sasc KEferEnO!

Excel Developer Reference Range.EntireColumn Property

Returns a Range object that represents the entire column {or columns) that contains the specified range. Read-only.

e-ipresscnEr tireColumn

express/on A variable that represents a Range object, Example

This example sets the value of the first cell in the column that contains the active cell. The example must be run from a warJisheet,

Visual Basic for Applications

Act-iveCell.Eat ireColtiron■Cells(1f 1).Value =5

See Also

EntireRaw Property * Range Object

Was this information helpful?


Yes || Mo || I don't know J


fir1. eI rtpiT ReferE^EE

-4 Connected to Office Qnlfne

See Also can often lead to further information on related objects and methods. Now, all that remains to do is connect the properties you found and apply them to the right object.

0 0

Post a comment