Notice: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead. in /home/swatipaliwal/public_html/ on line 3839
Excel Crazy

Methods and Properties

Methods and Properties

Each object contains its own methods and properties.

A Property represents a built-in or user-defined characteristic of the object.  A method is an action that you perform with an object.  Below are examples of a method and a property for the Workbook Object:


Close method close the active workbook


Count property returns the number of workbooks that are currently opened
Some objects have default properties. For example, Range’s default property is Value.
The following yields the same outcome.

Range(“A1”) = 1    and     Range(“A1”).Value = 1
Here are examples on how to set and to get a Range property value:
The following sets the value of range A1 or Cells(1,1)  as “2005”.  It actually prints “2005” on A1.

Range(“A1”).Value = 2005
The following gets the value from range A1 or Cells(1,1).

X = Range(“A1”).Value
Method can be used with or without argument(s).  The following two examples demostrate this behavior.

Methods That Take No Arguments:

Methods That Take Arguments:

Worksheets(“Sheet1”).Range(“A1:A10”).Sort _
Worksheets(“Sheet1”).Range(“A1”) is the Key (or column) to sort by.

June 11, 2015

0 responses on "Methods and Properties"

Leave a Message

Your email address will not be published. Required fields are marked *


© LOKESH PALIWAL 1987 - 2017

Reporting Solutions | Data Consulting | Analytics Training