Macro to type text

  • Thread starter Thread starter Bradley C. Hammerstrom
  • Start date Start date
B

Bradley C. Hammerstrom

Excel 2000

This seems simple, but . . .

I want to use one of the function keys, F10 for example, to automatically
type some simple text into the current cell. When I use the Macro Recorder
and I type the text, NA, and hit Enter. It creates code:
ActiveCell.Text.FormulaR1C1 = "NA"
Range ("R25") .Select
This gives me the correct text, NA, but always moves the active cell to R25,
instead of the next cell down (like hitting Enter).

Of course, presently I have to use Crtl+ any letter. I would preter not
having to use Crtl. I want to use F10.

How?

Brad H.
 
Try this

Sub test()
ActiveCell.Value = "NA"
ActiveCell.Offset(1, 0).Select
End Sub
 
Thanks, Ron,

I also got it to work by hitting Crl+Enter during recording. This is just
like Enter without moving the cursor to the next cell. The code created
simply eliminates the Select method line entirely.

I'm still looking for a way to assign F10 to a macro of my choosing. . .

Brad H.
 

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

Similar Threads


Back
Top