View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Carim[_2_] Carim[_2_] is offline
external usenet poster
 
Posts: 97
Default Select more than on CommandButton

On Jan 19, 11:51*am, K wrote:
Hi all, *I am trying to select all ComandButtons from 1 to 9 and I
wrote this code (see below) to do this job but I am getting error.
Please can any friend can help that what am I doing wrong.

Private Sub Image1_Click()
Dim i As Integer
For i = 1 To 9
Me.CommandButton&(i).Select
Next
End Sub


Hi,
Have a go with
Me.Controls("CommandButton" & i).Select

Cheers