How to select the first cell in celected row? (using VBA)

S

sergey_raevsky

Dear friends,
please help to find a solution of my task.

How to select the first cell in celected row? (using VBA).
And how to select (using Visual Basic) the range of first 12 cells i
any manually selected row?

Thanks in advance
 
C

crispbd

sergey_raevsky said:
Dear friends,
please help to find a solution of my task.

How to select the first cell in celected row? (using VBA).
And how to select (using Visual Basic) the range of first 12 cells i
any manually selected row?

Thanks in advance.


This selects the first cell in the Selected row:

CELLS(SELECTION.ROW,1).SELEC

This selects the first cell in the Active Cell's Row:

CELLS(ACTIVECELL.ROW,1).SELEC


This selects the first 12 cells in a selected row:

RANGE(CELLS(SELECTION.ROW,1),CELLS(SELECTION.ROW,12)).SELEC

...and for the first 12 cells in the active cell's row:

*Range(Cells(ActiveCell.Row,1),Cells(ActiveCell.Row,12)).Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top