Home > Software engineering >  Name of the command button with the commandbutton variable said
Name of the command button with the commandbutton variable said

Time:11-12

Form has multiple command button, want to use a for loop to name changed to 1, 2, 3 but "commandbutton" & amp; I.c aption=I this error, want to know how to connect the string can, thank you

CodePudding user response:

In this case, the VB interface controls can form "control array", which is the same type of control that can use the same name then add the index attribute to distinguish, control of events into the participation will also add the index which is used for the difference between control events,

CodePudding user response:

 Me. Controls (" CommandButton "& amp; I). The Caption=I 

CodePudding user response:

Good, upstairs study
  •  Tags:  
  • VBA
  • Related