vba code to record a macro

  • Thread starter Thread starter green fox
  • Start date Start date
G

green fox

I have a friend who has paralysis of his right side. All his
keyboarding is one-handed. He would like to use a keyboard shortcut --
say ctrl-z to start recording his key strokes...say down 2 right 4 from
the ActiveCell, edit that cell. Then when he moves to the next cell the
'macro' can be invoked again. When finished the macro needs to
'disappear' to be replace the next time he runs it.

I have found most of what I need, assigning and unassigning the
shortcut keys, and the cell movement and editing is all good. - well
it works, I am after all a VBA hack :-) - but I haven't been able to
find any method that would prompt the user to enter 'anything' and have
those movements recorded other than invoking the macro recorder from
the worksheet.

Is this possible, or am I barking up the wrong tree?

Andy
 
Andy,

This seems a shame not to get this thread answered, but I must admit to not
understanding exactly what you want. Could you try explaining it a little
differently. The bit about '... prompt to enter anything ...'. I assume you
have looked at Inputbox.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Sorry Bob,

I'm pushing the limits of my own understanding, and explaining things
badly. Let me try this again.

He wants to select a shortcut (usually CTRL-z because it's easiest for
him) then have each step he takes (down two cells, over two cells)
recorded so he could repeat it as many times as he needed to in that
session.

He would like to select a cell, say A10, then edit cell C12.
When he selects the next cell A14, cell C16 is edited the same way C12
was... either by editing the text, entering a new number, formatting
the font, clearing the contents... whatever he set up for it to do with
the first ''macro''.


At the end of the session, CTRL-z would be unassigned, so next time he
could work with a different pattern of momvement. Say down 5 cells,
clear, down 5 cells clear.

He works with large spreadsheets, lots of statistical stuff and would
like to reduce the number of keystrokes.

I think I'm on the right track, I can record a macro the regular way,
using the relational button and have the movements recorded, but I
can't see a way to incorporate that into a VBA routine. Is there some
sort of recorder object?

Thanks for your time
 
Back
Top