Microsoft Office Tutorials and References
In Depth Information Selection property
The code:
Dim a As Variant
a = Application.InputBox( _
Prompt:="Enter Array", Type:=64)
Debug.Print a(3,2)
will accept the input:
after which a(3,2) will equal 56.
As a final example, if we respond to the code:
Dim a As Variant
a = Application.InputBox( Prompt:="Enter Formula", Type:=1)
Range("D1").Formula = a
with a formula, Excel does not put the formula in the cell D1 (it puts only the number), even
though 1 is a sum of 1 and 0. In other words, we shouldn't take the sum statement too literally. Selection property
This property simply returns the currently selected object in the active window. For instance, if a
cell is selected, the property returns a Range object denoting this cell. The Selection property
returns Nothing if nothing is selected. Note that the property also applies to a Window object
and returns the current selection in that window. StatusBar property (R/W String)
This useful property returns or sets the text in Excel's status bar. To return control of the status bar
to Excel, simply set this property to False . (Similarly, this property will return False if Excel
currently has control over the status bar.) Intersect method
This method returns a Range object that represents the rectangular intersection of two or more
ranges. The syntax is:
Application.Intersect( Arg1 , Arg2 , ...)
where Arg1 , Arg2 , . . . are the Range objects whose ranges we wish to intersect. At least two
Range objects must be specified. For instance, the following line selects the intersection, which is
the range B2:D5:
Search JabSto ::

Custom Search