Thread: Edit a Cell
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Edit a Cell

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 ??
--
Gary''s Student - gsnu200827