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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,214,590
Messages
6,120,421
Members
448,961
Latest member
nzskater

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