Macro VBA Enter Key moves Left , Prompt ,Left, Prompt,Down Right,Right

wiesele

New Member
Joined
Jul 14, 2021
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Hi
Excel 2016 VBA Macro question

I want to create a Macro Button that controls the movement of my cursor (between entering data) and a 2nd macro.

Example
Start Macro (in any field)
Wait till a value is entered into a field (enter)
Move Left. Wait till a value to the field (enter)
Move Left. Wait till a value to the field (enter)
Move Left. Wait till a value to the field (enter)
Move Left. Wait till a value to the field (enter)

Move Down
Move Right
Move Right
Move Right
Move Right

Repeat.

Move from C5 to D5 to E5 to F5
Move to C6

Stop macro

Thanks
E.W.
 

Attachments

  • excel.JPG
    excel.JPG
    33.6 KB · Views: 10

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I figured it out

Public Sub InputBoxMoveLeft()

Dim strMsg As String
Dim strInputBoxText As String

strInputBoxText = Application.InputBox("Range is 24.8 - 26.8", "TC 224", "0")
ActiveCell = strInputBoxText 'Assign the value of the inputbox to a cell.
ActiveCell.Offset(0, 1).Select

strInputBoxText = Application.InputBox("Range is 6.25 - 6.45", "Port 6.5", "0")
ActiveCell = strInputBoxText 'Assign the value of the inputbox to a cell.
ActiveCell.Offset(0, 1).Select

strInputBoxText = Application.InputBox("Range is 9.9 - 10.1", "TC 10", "0")
ActiveCell = strInputBoxText 'Assign the value of the inputbox to a cell.
ActiveCell.Offset(1, -4).Select


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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
Back
Top