Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to create a piece of code that can refer to a specified command
button number I have tried approaches like the following intiated by clicking Commmand Button 4: Dim ThisButtonNo As String Dim ThisButtonName as string Dim ThisCommandButton As Object Private Sub CommandButton4_Click() ThisButtonNo = "2" ThisButtonName = "CommandButton" & ThisButtonNo Set ThisCommandButton = ThisButtonName ThisCommandButton.Enabled = True End Sub The problem is with the CommandButton object variable not set, but I don't know what code/variables to use to do this. Alan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
command button add another command | Excel Discussion (Misc queries) | |||
Creating a Command Button on a worksheet | Excel Discussion (Misc queries) | |||
Creating Command button Conditionally | Excel Programming | |||
Command Button vs Control Button | Excel Programming | |||
Command Button vs Form Button | Excel Programming |