引用:http://zhidao.baidu.com/question/95306345.html

Private Sub Form_load()
    Dim i As Integer
    For i = 0 To Me.Controls.Count - 1
        If Me.Controls.Item(i).Name = "Shape1" Then 'me 可以用你控件的窗体名称替换。
            MsgBox "存在"
            Exit Sub
        End If
    Next
    If i > Me.Controls.Count - 1 Then
        MsgBox "不存在"
    End If
End Sub

相关文章:

  • 2022-01-17
  • 2021-11-18
  • 2022-02-26
  • 2021-11-19
  • 2021-05-21
  • 2022-01-04
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2021-10-05
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2021-12-27
相关资源
相似解决方案