Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub buttonsAdd()
- Dim btn As Button
- LastRow = wsAuth.Cells(wsAuth.Rows.count, "A").End(xlUp).row
- Application.ScreenUpdating = False
- wsAuth.Buttons.Delete
- Dim t As Range
- For i = 1 To LastRow
- Set t = wsAuth.Range(wsAuth.Cells(i, 6), wsAuth.Cells(i, 6))
- Set btn = wsAuth.Buttons.add(t.Left, t.Top, t.Width, t.Height)
- With btn
- .OnAction = "btnS"
- .Caption = SignInButCaption & wsAuth.Cells(i, 1).Value
- .Name = "Btn" & i
- .HorizontalAlignment = xlLeft
- .VerticalAlignment = xlCenter
- .AutoSize = False
- End With
- Next i
- Application.ScreenUpdating = True
- End Sub
Add Comment
Please, Sign In to add comment