Results 1 to 1 of 1
2016-03-09, 16:00 #1
- Join Date
- Jan 2016
- Thanked 1 Time in 1 Post
Command Button Class Macro - Set Button Properties
good day to all.
I am stuck on a command button class macro.
My word document has like 20 command buttons, they all have basic properties which are the same such as the caption, font color etc.
I thought I may be able to put it in a class. but that's not working out very well
Option Explicit Public WithEvents myButtonGroup As CommandButton Private Sub myButtonGroup_Click() With myButtonGroup If .Caption = "Click" Then .ForeColor = 16777200 Else .BackColor = 60928 .Caption = "Executed" End If End With End Sub
Also on a side note does anybody have any idea how i can programmatically align the command buttons to center on each table cell - manually its a pain in the wrist pun intended.
I put the buttons in a table - some are aligned top, some bottom - I want them centered.
thanks for any ideas folks