Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default cells() property?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 563
Default cells() property?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default cells() property?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default cells() property?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using cells property bigjim Excel Programming 2 February 13th 10 01:47 PM
How do I use the .Cells property to refer to ActiveCell? Caeres Excel Discussion (Misc queries) 9 October 7th 08 02:56 PM
Merged cells Value2 property Sandrina Excel Programming 1 February 6th 06 02:58 PM
cells property Souris Excel Programming 1 August 18th 05 07:50 PM
Using Select with Range.Cells property Ralph Heidecke Excel Programming 2 January 15th 05 03:05 PM


All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"