Invoke Edit Mode

  • Thread starter Thread starter Zone
  • Start date Start date
Z

Zone

Is there a way in VBA to put the active cell into edit mode and to cancel
edit mode? TIA, James
 
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
 
Mike, Thanks for your reply. However, I mean I want to temporarily put
Excel into edit mode as occurs when F2 is pressed. James
 
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
 
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
 
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
 
That does it. Thanks, Mike!

Mike H said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top