#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default F2 (Edit) and Enter

Is there a VBA equivalent to doing this..

select a cell F2 into Edit mode - and Press enter Key

Is there a VBA Eqiv? If so, what code line(s)?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default F2 (Edit) and Enter

It sounds like you may be trying to emulate keystrokes in VBA, which
is possible to an extent. When it comes to editting a text string or
formula there are better ways to do it, such as MID, LEFT, RIGHT, etc.

Please give an example of what you're trying to do, with "before" and
"after". Also, please give an idea of how standardized the data is, if
any- along the lines of "the area code is always in parentheses" or
"the string length always varies".

Dave O
Eschew obfuscation
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 430
Default F2 (Edit) and Enter

Let's say I've just formatted a true number 123 as text (in Cell A1).
Before it was right justified. Afterwards it is left justified.
But I need to "refresh it by doing the F2, Enter on cell A1.

With a Macro (VBA) assigned to a button I would just have to click the
button.


"Dave O" wrote in message
...
It sounds like you may be trying to emulate keystrokes in VBA, which
is possible to an extent. When it comes to editting a text string or
formula there are better ways to do it, such as MID, LEFT, RIGHT, etc.

Please give an example of what you're trying to do, with "before" and
"after". Also, please give an idea of how standardized the data is, if
any- along the lines of "the area code is always in parentheses" or
"the string length always varies".

Dave O
Eschew obfuscation



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default F2 (Edit) and Enter

How about

Sub EnterSomething()
Dim R As Range
For Each R In Worksheets("Sheet1").Range("A1:A10") ' or For
each R in Selection
R = R.Value
Next R
End Sub



HTH,
JP


On Dec 20, 2:09 pm, Jim May wrote:
Is there a VBA equivalent to doing this..

select a cell F2 into Edit mode - and Press enter Key

Is there a VBA Eqiv? If so, what code line(s)?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter multiple numbers in a cell so total shows when enter keypres newbie Excel Worksheet Functions 2 August 19th 07 12:23 PM
How to enter or edit data to multiple worksheets on different ce Rodel Excel Worksheet Functions 0 June 8th 07 03:02 PM
F2 edit cells - new info disappears when I hit enter Will123 Excel Discussion (Misc queries) 1 December 1st 06 04:50 PM
Make "Edit" mode default, rather than "Enter"? Greg Boettcher Excel Discussion (Misc queries) 1 July 27th 06 01:46 AM
Why can't I edit my excel document? Edit buttons shaded. Arl @ CBC New Users to Excel 3 September 7th 05 01:18 AM


All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"