View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Newbie Cell Selection Question

Columns(1).SpecialCells(xlCellTypeConstants).Selec t


or better

Dim rng As Range

Set rng = Columns(1).SpecialCells(xlCellTypeConstants)

and work on rng

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Keith Wilby" wrote in message
...
Hi Group.

I'm a seasoned VBA programmer in Access but now I'm having to use
automation to have Access create line graphs in Excel.

How do you use code to select cells in a column that are populated with
data? By that I mean that, if I have cells A1 to A10 populated, how do I
get that range for use in code? I need to do this because, with each dump
of data from Access, the number of rows populated will change.

I'm guessing I need to loop through the cells collection until I find a
null but am unsure of the syntax.

Any pointers greatly appreciated.

Keith.
www.keithwilby.com