G
Gary''s Student
I have a cell that already contains some text. I need a macro that:
1. selects the cells
2. opens it for editting (like touching F2)
3. positions the editting cursor just after the third character in the cell
So, for example, if the cell contains:
Now is the time
and the user runs the macro, any text the user types next would be entered
just after the Now
My first attempt was:
Sub editt()
Range("B2").Select
Application.SendKeys ("{F2}")
For i = 1 To 100
Application.SendKeys ("{LEFT}")
Next
For i = 1 To 3
Application.SendKeys ("{RIGHT}")
Next
End Sub
This works, but only for machines that accept SendKeys.
I can't figure out how to enter edit mode without SendKeys ??
1. selects the cells
2. opens it for editting (like touching F2)
3. positions the editting cursor just after the third character in the cell
So, for example, if the cell contains:
Now is the time
and the user runs the macro, any text the user types next would be entered
just after the Now
My first attempt was:
Sub editt()
Range("B2").Select
Application.SendKeys ("{F2}")
For i = 1 To 100
Application.SendKeys ("{LEFT}")
Next
For i = 1 To 3
Application.SendKeys ("{RIGHT}")
Next
End Sub
This works, but only for machines that accept SendKeys.
I can't figure out how to enter edit mode without SendKeys ??