thediscopossum
New Member
- Joined
- May 1, 2014
- Messages
- 2
I am currently attempting to select multiple rows (Rows are variables) to group via a macro.
The problem is, it is not selecting the rows i want.
It seems to be putting the variables together as opposed to adding the totals together
ie, if MSTextBox = 3 and AVTextBox = 4, It groups Rows 4-34. Not Rows 4-8
Also the variables are taken from a text box within a userform.
Private Sub MSTextBox_Change()
Dim MSTextBox As Integer
End Sub
Private Sub AVTextBox_Change()
Dim MSTextBox As Integer
End Sub
Private Sub FinishButton_Click()
Rows((MSTextBox + 1) & " : " & ((MSTextbox) + (AVTextBox))).Select
Selection.Rows.Group
End Sub
Any assistance is greatly appreciated
The problem is, it is not selecting the rows i want.
It seems to be putting the variables together as opposed to adding the totals together
ie, if MSTextBox = 3 and AVTextBox = 4, It groups Rows 4-34. Not Rows 4-8
Also the variables are taken from a text box within a userform.
Private Sub MSTextBox_Change()
Dim MSTextBox As Integer
End Sub
Private Sub AVTextBox_Change()
Dim MSTextBox As Integer
End Sub
Private Sub FinishButton_Click()
Rows((MSTextBox + 1) & " : " & ((MSTextbox) + (AVTextBox))).Select
Selection.Rows.Group
End Sub
Any assistance is greatly appreciated