Friday, 27 September 2013

Excel VB Button

Excel VB Button

In the "ActiveSheet.Buttons" I get the size of the buttons but not the
text that I want, it only shows "Button 1" (whatever number shows up). Can
anyone tell me how to get a custom text in the button?
Sub AT()
Sheets("134B").Select
Sheets("New Tab").Visible = True
Sheets("New Tab").Select
ActiveSheet.Buttons.Add(0.75, 0.75, 36, 28.5).Select
ActiveSheet.Buttons.Add(37.5, 0.75, 17.25, 28.5).Select
ActiveSheet.Buttons.Add(55.5, 0.75, 17.25, 28.5).Select
ActiveSheet.Buttons.Add(73.5, 0.75, 36, 28.5).Select
Sheets("New Tab").Copy Before:=Sheets(3)
Sheets("New Tab").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("New Tab (2)").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("DB").Select
Range("J23").Select
End Sub

No comments:

Post a Comment