Execute VBA macro whilst editing a cell

  • Thread starter Thread starter Melandra
  • Start date Start date
M

Melandra

Hi all,

I'm having a few problems with some prototyping for some code we're
hopefully planning on putting in place for a customer.

What I'm trying to do is, given a macro that does something like:
Code:
--------------------
SendKeys "+{END}" ' shift-end
SendKeys "^X" ' cut to clipboard
--------------------
Execute that macro whilst the cursor is inside a cell of text. So, in
the case of a cell with the text "foo bar" and the cursor flashing
merrily away inbetween the two words, in theory select the text "bar"
and cut it to the clipboard. I'm still prototyping so forgive the
disgusting VBA hack :)

The problem seems to be that I can't execute a macro whilst a cell is
being edited. Even if I hotkey the macro or tie it to a menu bar, it
still doesn't execute.

Has anyone tried to do this before - and succeeded? Or should I be
happy that we're still roughing up some ideas and give up?

Thanks in advance.

Andy Belfield
Melandra
 
All sorts of things lock out if the formula bar is active - including
macro running.

Back to the drawing board .....................................
It would be easy to set up a dialog box or formula to split the cell
value based on a number entry - or is that too easy ? <<grin>>.
(OK - we all try to push the limits).
 
Back
Top