F2 + <enter> without sendkeys?

  • Thread starter Thread starter Jack Schitt
  • Start date Start date
J

Jack Schitt

Hi

Can someone please give me an elegant vba method of simulating F2 followed
by enter on a specified cell without using sendkeys?

The purpose is to convert a number stored as text back to a numerical value.

Any alternatives?

Thanks
 
Thanks that is just what I wanted

Beto said:
value.

Instead of that you could use this:

Sub Text2Number()
ActiveCell.Value = ActiveCell.Value
End Sub

Regards,
 
Jack said:
Hi

Can someone please give me an elegant vba method of simulating F2 followed
by enter on a specified cell without using sendkeys?

The purpose is to convert a number stored as text back to a numerical value.

Instead of that you could use this:

Sub Text2Number()
ActiveCell.Value = ActiveCell.Value
End Sub

Regards,
 
Jack,

Someone here in the groups told me a much easier way to convert a block of
Text into Numbers.

Copy a blank cell
Select the cells containing numbers
Edit, Paste Special
Paste = Values, Operation = Add
(effectively adds 0 to the range)

Rob
 
Back
Top