ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to get the first used cell position in VBA? (https://www.excelbanter.com/excel-programming/393789-how-get-first-used-cell-position-vba.html)

DFDY

how to get the first used cell position in VBA?
 
I use the (Sheet).UsedRange.Columns.Count in my code, so I need a first used
cell position to copy all the cells to the array.

Excel 2003

Can you leave the hyperlink for the object library here? I can't find it on
MSDN. Thank you in advance!

NickHK

how to get the first used cell position in VBA?
 
Not sure what you are trying to achieve, but maybe
(Sheet).UsedRange.Copy

As for reference material.

Whilst there this for v11, it's a bit limited:
http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx

Better here for v10:
http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx

Best v12:
http://msdn2.microsoft.com/en-us/library/bb149081.aspx

NickHK

"DFDY" wrote in message
...
I use the (Sheet).UsedRange.Columns.Count in my code, so I need a first

used
cell position to copy all the cells to the array.

Excel 2003

Can you leave the hyperlink for the object library here? I can't find it

on
MSDN. Thank you in advance!




Bob Phillips

how to get the first used cell position in VBA?
 
cells(activesheet.usedrange.row,activesheet.usedra nge.column)

will give you the first used cell

--
HTH

Bob

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

"DFDY" wrote in message
...
I use the (Sheet).UsedRange.Columns.Count in my code, so I need a first
used
cell position to copy all the cells to the array.

Excel 2003

Can you leave the hyperlink for the object library here? I can't find it
on
MSDN. Thank you in advance!




Gary Keramidas

how to get the first used cell position in VBA?
 
will this work?

activesheet.usedrange.range("a1").Address

--


Gary


"Bob Phillips" wrote in message
...
cells(activesheet.usedrange.row,activesheet.usedra nge.column)

will give you the first used cell

--
HTH

Bob

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

"DFDY" wrote in message
...
I use the (Sheet).UsedRange.Columns.Count in my code, so I need a first used
cell position to copy all the cells to the array.

Excel 2003

Can you leave the hyperlink for the object library here? I can't find it on
MSDN. Thank you in advance!






Bob Phillips

how to get the first used cell position in VBA?
 
Should do Gary.

--
HTH

Bob

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

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
will this work?

activesheet.usedrange.range("a1").Address

--


Gary


"Bob Phillips" wrote in message
...
cells(activesheet.usedrange.row,activesheet.usedra nge.column)

will give you the first used cell

--
HTH

Bob

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

"DFDY" wrote in message
...
I use the (Sheet).UsedRange.Columns.Count in my code, so I need a first
used
cell position to copy all the cells to the array.

Excel 2003

Can you leave the hyperlink for the object library here? I can't find it
on
MSDN. Thank you in advance!








Gary Keramidas

how to get the first used cell position in VBA?
 
ok, thanks bob

--


Gary


"Bob Phillips" wrote in message
...
Should do Gary.

--
HTH

Bob

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

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
will this work?

activesheet.usedrange.range("a1").Address

--


Gary


"Bob Phillips" wrote in message
...
cells(activesheet.usedrange.row,activesheet.usedra nge.column)

will give you the first used cell

--
HTH

Bob

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

"DFDY" wrote in message
...
I use the (Sheet).UsedRange.Columns.Count in my code, so I need a first used
cell position to copy all the cells to the array.

Excel 2003

Can you leave the hyperlink for the object library here? I can't find it on
MSDN. Thank you in advance!









DFDY

how to get the first used cell position in VBA?
 
Hi NickHK,

It is empty here.

http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx

But thank you all the same!

"NickHK" wrote:

Not sure what you are trying to achieve, but maybe
(Sheet).UsedRange.Copy

As for reference material.

Whilst there this for v11, it's a bit limited:
http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx

Better here for v10:
http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx

Best v12:
http://msdn2.microsoft.com/en-us/library/bb149081.aspx

NickHK

"DFDY" wrote in message
...
I use the (Sheet).UsedRange.Columns.Count in my code, so I need a first

used
cell position to copy all the cells to the array.

Excel 2003

Can you leave the hyperlink for the object library here? I can't find it

on
MSDN. Thank you in advance!






All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com