Select Cell based on OnKey and Autofill

tcarter963

New Member
Joined
Aug 3, 2006
Messages
38
I'm trying to get the cursor to move to another column when you press enter at a specific row in the sheet. I also would like to be able to move the autofill feature when you reach that same row in the spreasheet. I was able to find some code on the message board that kind of worked, but only when running in VBA, I can't get it to work when you press enter in the sheet. I haven't looked for info on autofill yet.

Here is what I have so far:
Code:
Sub aaa()
 If ActiveCell.Row = 43 Then
  Cells(11, ActiveCell.Column + 4).Select
 Else
  ActiveCell.Offset(1, 0).Select
 End If
End Sub

Sub bbb()
 Application.OnKey "{ENTER}", "aaa"
End Sub

Sub ccc()
Application.OnKey "{ENTER}"
End Sub

Code:
Private Sub Sheet1_Activate()
 Call bbb
End Sub

Private Sub Sheet1_Deactivate()
Call ccc
End Sub


Thanks
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

tcarter963

New Member
Joined
Aug 3, 2006
Messages
38
I was able to get everything to work fine for moving the cursor with one exception. I would like for it to move to another column based on two specific cells (E43 & I43) rather than a whole row. I've played around with this a bit and I know it has to be something simple, but just can't get it.

I haven't been able to find anything about moving the autofill feature to another column. Is this even possible to do using VBA?
 

Forum statistics

Threads
1,141,098
Messages
5,704,319
Members
421,338
Latest member
Pepess

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top