Nigel Martin
Board Regular
- Joined
- Feb 17, 2002
- Messages
- 133
Dave Hawley - You may recall you helped me with this:
Hi Nigel
assumming you know how to select a cell with VBA place this in the Private Module of the Sheet concerned. Right click on the sheet name tab and select "View Code"
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Application.MoveAfterReturn = Not IsEmpty(Target.Value)
End If
End Sub
As you can see it assumes your cell is A1
Trouble I do not know how to select a cell in VBA (fairly new to this VBA game - still learning).
Hi Nigel
assumming you know how to select a cell with VBA place this in the Private Module of the Sheet concerned. Right click on the sheet name tab and select "View Code"
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Application.MoveAfterReturn = Not IsEmpty(Target.Value)
End If
End Sub
As you can see it assumes your cell is A1
Trouble I do not know how to select a cell in VBA (fairly new to this VBA game - still learning).