ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting the cell in Column A (https://www.excelbanter.com/excel-programming/377311-selecting-cell-column.html)

Fred Holmes

Selecting the cell in Column A
 
Is there a more elegant way than:

Sub CellInColumn1Select()
While ActiveCell.Column 1
ActiveCell.Offset(0, -1).Select
Wend
End Sub

To select the cell in Column A / Column 1?

Is there some syntax that will produce the Range address of the cell
in Column A directly?

Thanks,

Fred Holmes

Paul B

Selecting the cell in Column A
 
Fred, looks like you are selecting the cell below the last cell with data,
if that is the case try this

Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Fred Holmes" wrote in message
...
Is there a more elegant way than:

Sub CellInColumn1Select()
While ActiveCell.Column 1
ActiveCell.Offset(0, -1).Select
Wend
End Sub

To select the cell in Column A / Column 1?

Is there some syntax that will produce the Range address of the cell
in Column A directly?

Thanks,

Fred Holmes




[email protected]

Selecting the cell in Column A
 
Something like:

Sub Adddress()
If ActiveCell.Column < 1 Then
MsgBox ActiveCell.Offset(0, -1).Address
End If
End Sub


Fred Holmes wrote:
Is there a more elegant way than:

Sub CellInColumn1Select()
While ActiveCell.Column 1
ActiveCell.Offset(0, -1).Select
Wend
End Sub

To select the cell in Column A / Column 1?

Is there some syntax that will produce the Range address of the cell
in Column A directly?

Thanks,

Fred Holmes



Fred Holmes

Selecting the cell in Column A
 
No, I am trying to select the cell in Column one on any row of the
worksheet -- before launching (showing) a UserForm that is a
customized "Data, Form". I'm using the worksheet in its normal view,
and I want to launch the userform in order to be able to read/enter
data more easily using the UserForm. I get screwy error messages and
the UserForm.Show produces an error message on occasion. Selecting
the cell in Column A before launching the UserForm seems to fix
things.

Excel 2000.

Thanks,

Fred Holmes

On Tue, 14 Nov 2006 13:58:06 -0500, "Paul B"
wrote:

Fred, looks like you are selecting the cell below the last cell with data,
if that is the case try this

Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select




All times are GMT +1. The time now is 11:02 PM.

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