Form Contol Button Macro VBA

jrgregory

New Member
Joined
Mar 3, 2019
Messages
4
I need a form Button to Move to the relative cell in Column J (relative to the row I'm typing in). So, if I'm typing in any cell in row 25 I need it to move to Cell J25 and type a text when I press the form button. I know how to get the text in. When I record a Macro, it's recording an offset. Any help is most appreciated.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Do you really need it to move to cell J25? This sample code puts some text in column J of the active row.

Code:
Sub AddTextToColJ()
  Dim Sht As Worksheet
  
  Set Sht = ActiveSheet
  Sht.Cells(ActiveCell.Row, "J").Value = "Text from Source"
  
End Sub
 
Upvote 0

Forum statistics

Threads
1,226,112
Messages
6,189,040
Members
453,521
Latest member
Chris_Hed

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