How To Get Excel To Record Keystrokes And Not Just The Results

M

Minitman

Greetings,

I need to use the "Text to Columns" function under the Data menu
choice to split up my data. In order to prepare the data for this
procedure, I am inserting "+"'s into the data where it needs to be
split. It is working, however I am looking for a way to automate the
insertion since I am dealing with about 5000 cells and it is taking
way too long! Is there a way to record a macro to repeat keystrokes
without the results? For instance: I select a cell then and need to
start a macro that will hit <F2> to get into the cell editor, hit
<Ctrl-A> then <Ctrl-C> and then hit <Esc> to leave the cell editor,
hit <Ctrl-H> to get into "Find and Replace", hit <Ctrl-V>, <Tab>,
<Ctrl-V>. This is where I need the macro to end so that I can modify
each one separately.

Is there anyway to do this? The macro recorder records the results of
each keystroke, not the keystroke itself, any ideas?

TIA

-Minitman
 
D

Dave Peterson

I'm not sure what you're doing with the data|text to columns, but you could just
use the value in the activecell and plop that into the edit|replace dialog:

Option Explicit
Sub testme()
Dim myText As String
myText = ActiveCell.Text
Application.Dialogs(xlDialogFormulaReplace).Show arg1:=myText
End Sub


(The macro recorder records actions--not keystrokes. But sometimes, there's a
way to do what you want.)
 

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

Top