ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Invoke Edit Mode (https://www.excelbanter.com/excel-programming/397521-invoke-edit-mode.html)

Zone[_3_]

Invoke Edit Mode
 
Is there a way in VBA to put the active cell into edit mode and to cancel
edit mode? TIA, James



Mike H

Invoke Edit Mode
 
Hi,

I'm unclear about what you mean by 'Edit Mode'. If you want to edit the
active cell using code then you can simply say:-

activecell.value= 1
activecell.value="Myvalue"
activecell.value=activecell.value+7


Can you be more precise about what you are trying to do.

Mike

"Zone" wrote:

Is there a way in VBA to put the active cell into edit mode and to cancel
edit mode? TIA, James




Zone[_3_]

Invoke Edit Mode
 
Mike, Thanks for your reply. However, I mean I want to temporarily put
Excel into edit mode as occurs when F2 is pressed. James

"Mike H" wrote in message
...
Hi,

I'm unclear about what you mean by 'Edit Mode'. If you want to edit the
active cell using code then you can simply say:-

activecell.value= 1
activecell.value="Myvalue"
activecell.value=activecell.value+7


Can you be more precise about what you are trying to do.

Mike

"Zone" wrote:

Is there a way in VBA to put the active cell into edit mode and to cancel
edit mode? TIA, James






David Hilberg

Invoke Edit Mode
 
I thought I would start recording a macro, hit F2 to enter edit mode,
then stop recording to see what the VBA code was, but you cannot stop
recording a macro while in edit mode.

How modal.

- David

Zone wrote:
Is there a way in VBA to put the active cell into edit mode and to cancel
edit mode? TIA, James



Mike H

Invoke Edit Mode
 
I may be missing something but my point remains the same, what is the OP
actually trying to do? If you want a macro to active edit mode on a cell
paste this in, put a button on the worksheet to call it:-

Sub stance()
SendKeys "{F2}"
End Sub

Mike


"David Hilberg" wrote:

I thought I would start recording a macro, hit F2 to enter edit mode,
then stop recording to see what the VBA code was, but you cannot stop
recording a macro while in edit mode.

How modal.

- David

Zone wrote:
Is there a way in VBA to put the active cell into edit mode and to cancel
edit mode? TIA, James




David Hilberg

Invoke Edit Mode
 
I would think the OP's macro will do some work, then invoke edit mode to
set up the user for some manual input. I'll bet your code is just the thing.

- David

Mike H wrote:
I may be missing something but my point remains the same, what is the OP
actually trying to do? If you want a macro to active edit mode on a cell
paste this in, put a button on the worksheet to call it:-

Sub stance()
SendKeys "{F2}"
End Sub

Mike


"David Hilberg" wrote:

I thought I would start recording a macro, hit F2 to enter edit mode,
then stop recording to see what the VBA code was, but you cannot stop
recording a macro while in edit mode.

How modal.

- David

Zone wrote:
Is there a way in VBA to put the active cell into edit mode and to cancel
edit mode? TIA, James



Zone[_3_]

Invoke Edit Mode
 
That does it. Thanks, Mike!

"Mike H" wrote in message
...
I may be missing something but my point remains the same, what is the OP
actually trying to do? If you want a macro to active edit mode on a cell
paste this in, put a button on the worksheet to call it:-

Sub stance()
SendKeys "{F2}"
End Sub

Mike


"David Hilberg" wrote:

I thought I would start recording a macro, hit F2 to enter edit mode,
then stop recording to see what the VBA code was, but you cannot stop
recording a macro while in edit mode.

How modal.

- David

Zone wrote:
Is there a way in VBA to put the active cell into edit mode and to
cancel
edit mode? TIA, James







All times are GMT +1. The time now is 11:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com