vb label caption问题
'form6PrivateSubForm_Load()IfForm5.Check1.Value=TrueThenLabel3.Caption=Form5.Check1.C...
'form 6
Private Sub Form_Load()
If Form5.Check1.Value = True Then
Label3.Caption = Form5.Check1.Caption
End If
If Form5.Check2.Value = True Then
Label4.Caption = Form5.Check2.Caption
End If
If Form5.Check3.Value = True Then
Label5.Caption = Form5.Check3.Caption
End If
If Form5.Check4.Value = True Then
Label6.Caption = Form5.Check4.Caption
End If
End Sub
有错吗?
或者
'form5
Private Sub Command2_Click()
Form6.Show
If Check1.Value = True Then
Form6.Label3.Caption = "Bruno Mars - When I Was Your Man.mp3"
Else
Form6.Label3.Caption = ""
End If
If Check2.Value = True Then
Form6.Label4.Caption = "Demi Lovato - Let It Go (Single Version).mp3"
Else
Form6.Label4.Caption = ""
End If
If Check3.Value = True Then
Form6.Label5.Caption = "Kristen Bell - Do You Want to Build a Snowman_.mp3"
Else
Form6.Label5.Caption = ""
End If
If Check4.Value = True Then
Form6.Label6.Caption = "Idina Menzel - For the First Time in Forever.mp3"
Else
Form6.Label6.Caption = ""
End If
Unload Form5
End Sub
这样也不行,form6 label控件显示不出来
这是为什么? 展开
Private Sub Form_Load()
If Form5.Check1.Value = True Then
Label3.Caption = Form5.Check1.Caption
End If
If Form5.Check2.Value = True Then
Label4.Caption = Form5.Check2.Caption
End If
If Form5.Check3.Value = True Then
Label5.Caption = Form5.Check3.Caption
End If
If Form5.Check4.Value = True Then
Label6.Caption = Form5.Check4.Caption
End If
End Sub
有错吗?
或者
'form5
Private Sub Command2_Click()
Form6.Show
If Check1.Value = True Then
Form6.Label3.Caption = "Bruno Mars - When I Was Your Man.mp3"
Else
Form6.Label3.Caption = ""
End If
If Check2.Value = True Then
Form6.Label4.Caption = "Demi Lovato - Let It Go (Single Version).mp3"
Else
Form6.Label4.Caption = ""
End If
If Check3.Value = True Then
Form6.Label5.Caption = "Kristen Bell - Do You Want to Build a Snowman_.mp3"
Else
Form6.Label5.Caption = ""
End If
If Check4.Value = True Then
Form6.Label6.Caption = "Idina Menzel - For the First Time in Forever.mp3"
Else
Form6.Label6.Caption = ""
End If
Unload Form5
End Sub
这样也不行,form6 label控件显示不出来
这是为什么? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询