Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping
I want to start in cell A1 and each time I click a button on a userForm I
want the cursor to move to the next cell, in this case, a2. Then, if the cursor is in a2, when the button is clicked again, I would like the cursor to move to a3. Any ideas? Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping
One way:
Private Sub CommandButton1_Click() With Selection If .Row + .Rows.Count = .Parent.Rows.Count Then .Parent.Cells(1, .Column).Resize( _ .Rows.Count, .Columns.Count).Select Else .Offset(1, 0).Select End If End With End Sub In article , "Steve" wrote: I want to start in cell A1 and each time I click a button on a userForm I want the cursor to move to the next cell, in this case, a2. Then, if the cursor is in a2, when the button is clicked again, I would like the cursor to move to a3. Any ideas? Thanks, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping
Try:
If ActiveCell.Row < 65536 Then Cells(ActiveCell.Row + 1, ActiveCell.Column).Select "Steve" wrote: I want to start in cell A1 and each time I click a button on a userForm I want the cursor to move to the next cell, in this case, a2. Then, if the cursor is in a2, when the button is clicked again, I would like the cursor to move to a3. Any ideas? Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looping | Excel Discussion (Misc queries) | |||
Next For looping in a If | Excel Programming | |||
Looping | Excel Programming | |||
Looping | Excel Programming | |||
Looping | Excel Programming |