My worksheet contains a list of buttons at each row. The name of button is like: for example, row 15 has a button named Line15; row 16 has a button called Line16.
I have a sub to transfer the row information to another worksheet only if the data in that row is integrate.
And I want to hide the buttons of the rows whose data have been tranfered.
I try to get the button name as below, but it is wrong. How to get the button name in a for loop where row number is the increment variable?
my full sub code is as follows:
Best regards,
lolo
I have a sub to transfer the row information to another worksheet only if the data in that row is integrate.
And I want to hide the buttons of the rows whose data have been tranfered.
I try to get the button name as below, but it is wrong. How to get the button name in a for loop where row number is the increment variable?
Code:
Dim buttonName As String
buttonName = "Line" & Row
buttonName.Visible = False
Code:
Private Sub SubmitAll_Click()
Dim Row As Integer
For Row = 15 To 36
Call Functionality.set_GLB_rngToCopy(Row)
If (Functionality.checkIntegrity) Then
SendData (Row)
Dim buttonName As String
buttonName = "Line" & Row
buttonName.Visible = False
End If
Next Row
End Sub
Best regards,
lolo