Recording my macro

  • Thread starter Thread starter shboom
  • Start date Start date
S

shboom

I've tried.....believe me I've tried. My fingers are sore.
I recorded my key strokes using F5 for GOTO, such as A5, then C5, the
E5, and finishing with G5.
I review my code, and try to edit it to allow for user input into eac
of these cells.
I tried Application.AllowEdit and a slew of other -methods-, to n
avail.
There's gotta be an easier way to do this. What the heck am I missin
here?
Will someone tell me the big secret pleeeeeze.
Going back to QuattroPro is looking better and better each day, but i
ain't an option
 
shboom

Try this worksheet event code.

''moves from A5 through G5 at when <ENTER> is hit.
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$A5"
Range("C5").Select
Case "$C$5"
Range("E5").Select
Case "$E$5"
Range("G5").Select
End Select
End Sub

Right-click on the sheet tab and "View Code"

Paste in there.

Gord Dibben Excel MVP
 
Hi Gord

i think you left off a "$"
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$A$5" 'this needs to be changed
Range("C5").Select
Case "$C$5"
Range("E5").Select
Case "$E$5"
Range("G5").Select
End Select
End Sub

Cheers
JulieD
 
Back
Top