Row Spacing Between Command Button

diamond

New Member
Joined
Apr 5, 2002
Messages
21
I have searched this site but I didn't find the answer to this question.

I have created Command Button to bring me down to rows then other buttons to bring me back to the top of the page. I have a file with over 1200 rows.

My problem is that I need to add rows in between the buttons but every things change. I need a way to set a cell for the button and it would be floating. It wouldn't matter how many rows I insert in between then.

Here is an example of what I have done.

Private Sub CommandButton1_Click()
Range("A900").Select
End Sub


Private Sub CommandButton2_Click()
Range("A3").Select
End Sub

I have many schools, a buttom bring me at the beginning of the school rows then at the end a buttom bring me back up.

Thanks for your help, I'm a beginner.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hello Denis,

if you want to find the first open cell in a column, use:

Sub findLast()
Range("C1").Select
ActiveCell.End(xlDown).Offset(1, 0).Select
End Sub

and in the great words of Just Jon:
If column C has holes in it, and you wish to append data below the last used cell as opposed to starting with the 1st unused cell, you can use --
Dim LastRow as Long
...
LastRow=[C65536].End(3).Row + 1
' Cells(LastRow, 3) will reference the column C cell
...

HTH
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,920
Members
448,533
Latest member
thietbibeboiwasaco

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