-1
嗨即時嘗試創建一個簡單的程序涉及對象和類內 VB 6.0。「用戶定義的類型未定義」錯誤
該錯誤消息我得到的是:「沒有定義用戶定義的類型」
的強調,VB懷疑爲「昏暗鮑勃由於球」
我的定義的類是如下代碼:
Dim Bob As Object
Public Sub Ball()
Dim Circlex As Integer
Dim Circley As Integer
Public Sub makeBall()
Circlex = 3000
Circley = 3000
End Sub
Private Sub moveBall()
Circle (Circlex, Circley), 200
End Sub
End Sub
我爲我的項目中唯一的形式代碼:
Private Sub Command1_Click()
Command1.Visible = False
Command1.Enabled = False
vbalProgressBar1.Visible = True
Timer1.Enabled = True
Beep
End Sub
Private Sub Form_Load()
Form1.Width = 6000
Form1.Height = 6000
Dim Bob As Ball
Dim Bob As New Ball
End Sub
Private Sub Form_Unload(Cancel As Integer)
If MsgBox("Are you sure you want to be a quitter?!"
, vbYesNo,"Quit?") = vbYes Then
Unload Me
Set Form1 = Nothing
Else
Cancel = 1
End If
End Sub
Private Sub Timer1_Timer()
Bob = moveBall(Circlex, Circley)
End Sub
林不知道w ^可疑的代碼行不正確,但任何幫助將不勝感激!
,除非你有一個名爲'Ball'的類或結構,錯誤信息是正確的 – Plutonix
[用戶定義類型未定義--Excel宏]可能的重複(http://stackoverflow.com/questions/24261557/user-defined-type-不定義-Excel的宏) –