Going to a cell in column B

J

Jock

I use VBA to copy data from a row on 'Post' to the next blank row on
'Charging'.
What can I add to my code to:
A) open 'Charging' on screen and then
B) get cell B on the row which has just been copied to 'Charging' to have
focus?

Code below:
Sub Charge()

If ActiveCell.Value = "CH" Then
RowNo = ActiveCell.Row
With Sheets("Charging")
Lastrow = .Range("B" & Rows.Count).End(xlUp).Row
Newrow = Lastrow + 1
End With
Sheets("Charging").Range("B" & Newrow).Value = _
Sheets("Post").Range("B" & RowNo)
Sheets("Charging").Range("C" & Newrow).Value = _
Sheets("Post").Range("E" & RowNo)
etc. etc.
End If
End Sub
 
A

aidan.heritage

Application.Goto Reference:=Worksheets("Charging").Range("B" & Newrow)
--
Gary''s Student - gsnu200823








- Show quoted text -

Or try
Worksheets("Charging").Range("B" & Newrow).activate
 

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