VB如何用实现自动50个按钮
VB用代何如何实现自动生产50个按钮,
Option Explicit Private WithEvents cmdobject As CommandButton Private Sub form_load() Dim i As Integer Dim a As String For i = 1 To 5 a = "command" & i Set cmdobject = Controls.Add("", a) cmdobject.Visible = True cmdobject.Caption = i cmdobject.Left = i * cmdobject.Width + 10 Next End Sub简单写了一个示例,看看.