Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving to next cell down

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Help - i'm a beginner!

Could someone insert a line into this macro so that it move to the cell below after it as completed it operation.

Private Sub PlugRateP1_Click()
ActiveCell.FormulaR1C1 = "p1"
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
End Sub

The run button is on a userform. Can anyone insert a line that leave excel working rather than the userform?

Cheers
 



Private Sub PlugRateP1_Click()
ActiveCell.FormulaR1C1 = "p1"
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
ActiveCell.Offset(1, 0).Select

End Sub
 
This will move down 1 row and stay in the same column.

ActiveCell.Offset(1, 0).Activate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top