Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm confused. I'm working with Excel 2003 and trying to manipulate cells on a worksheet. Looking at the Excel 2003 VB Reference documentation I see examples like the following: Worksheets("Sheet1").Cells(5, 3).Font.Size = 14 Worksheets("Sheet1").Cells(1).ClearContents Now to me that means that Cells() is an object because it has properties, ..Font.Size, and methods, .ClearContents. However, in the documentation all I can find is a Cells property, how can this be? What I would like to do is find a listing of all the "properties", "methods" and "events" of the Cells property. How do I go about changing font color, size, cell shading, borders and what-not of a cell? Like I said, I'm a bit confused. Thanks in advence, Linn |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Linn,
You are not the first to be confused by this! Cells is a Property of the Range object Range.Cells(1,1) can be shortened to Cells(1,1) but the latter still represents a Range property. I Googled "Excel VBA Cells" and found some site that might help you. One of them s http://www.anthony-vba.kefra.com/vba/vbabasic2.htm best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "Linn Kubler" wrote in message ... Hi, I'm confused. I'm working with Excel 2003 and trying to manipulate cells on a worksheet. Looking at the Excel 2003 VB Reference documentation I see examples like the following: Worksheets("Sheet1").Cells(5, 3).Font.Size = 14 Worksheets("Sheet1").Cells(1).ClearContents Now to me that means that Cells() is an object because it has properties, .Font.Size, and methods, .ClearContents. However, in the documentation all I can find is a Cells property, how can this be? What I would like to do is find a listing of all the "properties", "methods" and "events" of the Cells property. How do I go about changing font color, size, cell shading, borders and what-not of a cell? Like I said, I'm a bit confused. Thanks in advence, Linn |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cells is an object, but an object can be a property of another object. Range
can be a property of Range! -- HTH Bob "Linn Kubler" wrote in message ... Hi, I'm confused. I'm working with Excel 2003 and trying to manipulate cells on a worksheet. Looking at the Excel 2003 VB Reference documentation I see examples like the following: Worksheets("Sheet1").Cells(5, 3).Font.Size = 14 Worksheets("Sheet1").Cells(1).ClearContents Now to me that means that Cells() is an object because it has properties, .Font.Size, and methods, .ClearContents. However, in the documentation all I can find is a Cells property, how can this be? What I would like to do is find a listing of all the "properties", "methods" and "events" of the Cells property. How do I go about changing font color, size, cell shading, borders and what-not of a cell? Like I said, I'm a bit confused. Thanks in advence, Linn |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cells is not an object type in and of itself (e.g., you can't declare
a variable of type Cells). It is simply a property of a Range object that returns (another) Range object. As such, it doesn't have properties of methods itself. Since it is a Range object, it has the same properties and methods of a Range. Any operation that can carried out on a "normal" Range can be done with the Range returned by Cells. Cordially, Chip Pearson Microsoft Most Valuable Professional, Excel, 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com On Tue, 23 Mar 2010 08:44:08 -0500, "Linn Kubler" wrote: Hi, I'm confused. I'm working with Excel 2003 and trying to manipulate cells on a worksheet. Looking at the Excel 2003 VB Reference documentation I see examples like the following: Worksheets("Sheet1").Cells(5, 3).Font.Size = 14 Worksheets("Sheet1").Cells(1).ClearContents Now to me that means that Cells() is an object because it has properties, .Font.Size, and methods, .ClearContents. However, in the documentation all I can find is a Cells property, how can this be? What I would like to do is find a listing of all the "properties", "methods" and "events" of the Cells property. How do I go about changing font color, size, cell shading, borders and what-not of a cell? Like I said, I'm a bit confused. Thanks in advence, Linn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using cells property | Excel Programming | |||
How do I use the .Cells property to refer to ActiveCell? | Excel Discussion (Misc queries) | |||
Merged cells Value2 property | Excel Programming | |||
cells property | Excel Programming | |||
Using Select with Range.Cells property | Excel Programming |