Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,449 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,132 people online right now. Registration is fast and FREE... Join Now!




Can anyone help me?

 
Reply to this topicStart new topic

Can anyone help me?, Show all data in msgbox

jomar2010
30 Jul, 2008 - 03:10 AM
Post #1

New D.I.C Head
*

Joined: 11 Jul, 2008
Posts: 5

vb

Dim t1 As String
Dim t2 As String
Dim t3 As String
Dim t4 As String
Dim t5 As String
Dim t6 As String
Dim t7 As String
Dim t8 As String
Dim t9 As String
Dim t10 As String

Dim level1 As Boolean
Dim level2 As Boolean
Dim level3 As Boolean
Dim level4 As Boolean

Dim gender As Boolean

Private Sub cboCity_Click()
t3 = cboCity.Text
End Sub

Private Sub chk1_Click()
t4 = True
t4 = chk1.Caption
If msg.t5.Caption = "" Then
msg.t5.Caption = "Running"
Else
If msg.t6.Caption = "" Then
msg.t6.Caption = "Running"
Else
If msg.t7.Caption = "" Then
msg.t7.Caption = "Running"
Else
End If
End If
End If
End Sub

Private Sub chk2_Click()
t5 = chk2.Caption
If msg.t5.Caption = "" Then
msg.t5.Caption = "Walking"
Else
If msg.t6.Caption = "" Then
msg.t6.Caption = "Walking"
Else
If msg.t7.Caption = "" Then
msg.t7.Caption = "Walking"
Else
End If
End If
End If
End Sub

Private Sub chk3_Click()
t6 = chk3.Caption
If msg.t5.Caption = "" Then
msg.t5.Caption = "Biking"
Else
If msg.t6.Caption = "" Then
msg.t6.Caption = "Biking"
Else
If msg.t7.Caption = "" Then
msg.t7.Caption = "Biking"
Else
End If
End If
End If
End Sub

Private Sub chk4_Click()
t7 = chk4.Caption
If msg.t5.Caption = "" Then
msg.t5.Caption = "Swimming"
Else
If msg.t6.Caption = "" Then
msg.t6.Caption = "Swimming"
Else
If msg.t7.Caption = "" Then
msg.t7.Caption = "Swimming"
Else
End If
End If
End If
End Sub

Private Sub chk5_Click()
t8 = chk5.Caption
If msg.t5.Caption = "" Then
msg.t5.Caption = "Skiing"
Else
If msg.t6.Caption = "" Then
msg.t6.Caption = "Skiing"
Else
If msg.t7.Caption = "" Then
msg.t7.Caption = "Skiing"
Else
End If
End If
End If
End Sub

Private Sub chk6_Click()
t9 = chk6.Caption
If msg.t5.Caption = "" Then
msg.t5.Caption = "In-Line Skating"
Else
If msg.t6.Caption = "" Then
msg.t6.Caption = "In-Line Skating"
Else
If msg.t7.Caption = "" Then
msg.t7.Caption = "In-Line Skating"
Else
End If
End If
End If
End Sub

Private Sub cmdExit_Click()
End
End Sub

Private Sub cmdNew_Click()
txtName.Text = ""
txtAge.Text = ""

End Sub

Private Sub cmdShow_Click()
t1 = txtName.Text & "is" & txtAge.Text & "Years old"
msg.t1.Caption = t1
If gender = True And level1 = True Then

level2 = False
level3 = False
level3 = False

msg.t2.Caption = "He Lives in" & "" & cboCity.Text
msg.t3.Caption = "He is" & "" & "Extreme" & "," & "Athlete"
msg.t4.Caption = "Activities Included."
msg.Show
Else
If gender = True And level2 = True Then
level1 = False
level3 = False
level4 = False

msg.t2.Caption = "He Lives in" & "" & cboCity.Text
msg.t3.Caption = "He is" & "" & "Advanced" & "," & "Athlete"
msg.t4.Caption = "Activities Included."
msg.Show
Else
If gender = True And level3 = True Then

level1 = False
level2 = False
level4 = False

msg.t2.Caption = "He Lives in" & "" & cboCity.Text
msg.t3.Caption = "He is" & "" & "Intermediate" & "," & "Athlete"
msg.t4.Caption = "Activities Included."
msg.Show
Else

If gender = True And level4 = True Then

level1 = False
level2 = False
level3 = False

msg.t2.Caption = "He Lives in" & "" & cboCity.Text
msg.t3.Caption = "He is" & "" & "Beginner" & "," & "Athlete"
msg.t4.Caption = "Activities Included."
msg.Show
Else

If gender = False And level1 = True Then

level2 = False
level3 = False
level4 = False

msg.t2.Caption = "She Lives in" & "" & cboCity.Text
msg.t3.Caption = "She is" & "" & "Extreme" & "," & "Athlete"
msg.t4.Caption = "Activities Included."
msg.Show
Else

If gender = False And level2 = True Then

level1 = False
level3 = False
level4 = False

msg.t2.Caption = "She Lives in" & "" & cboCity.Text
msg.t3.Caption = "She is" & "" & "Advanced" & "," & "Athlete"
msg.t4.Caption = "Activities Included."
msg.Show
Else

If gender = False And level3 = True Then

level1 = False
level2 = False
level4 = False

msg.t2.Caption = "She Lives in" & "" & cboCity.Text
msg.t3.Caption = "She is" & "" & "Intermediate" & "," & "Athlete"
msg.t4.Caption = "Activities Included."
msg.Show
Else

If gender = False And level4 = True Then

level1 = False
level2 = False
level3 = False

msg.t2.Caption = "She Lives in" & "" & cboCity.Text
msg.t3.Caption = "She is" & "" & "Beginner" & "," & "Athlete"
msg.t4.Caption = "Activities Included."
msg.Show
Else
If gender = False Then
msg.t2.Caption = "Shelives in" & "" & cboCity.Text
msg.Show

Else
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub

Private Sub opt1_Click()
gender = True
End Sub

Private Sub opt2_Click()
gender = False
End Sub

Private Sub optAdvanced_Click()
level2 = True
level1 = False
level3 = False
level4 = False

End Sub

Private Sub optBeginner_Click()
level4 = True
level1 = False
level2 = False
level3 = False

End Sub

Private Sub optExtreme_Click()
level1 = True
level2 = False
level3 = False
level4 = False

End Sub

Private Sub optIntermediate_Click()
level3 = True
level1 = False
level2 = False
level4 = False

End Sub






can anyone correct my error the error are:
error number 1: said "Run-time error "424"
Object Required
msg.t1.Caption = t1



error number 2:said "Run-time error "424"
Object required
If msg.t5.Caption = "" Then


can anyone help me plsssssssss

Mod Edit: Please use code tags when posting your code. Code tags are used like so => code.gif

Thanks,
PsychoCoder smile.gif
User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Can Anyone Help Me?
30 Jul, 2008 - 03:37 AM
Post #2

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
In the future please encase your code within the [ code] [ /code] tags. smile.gif

When you say "all data", what exactly is "all the data"? A way to show a lot of data in a single MsgBox is by making a string variable and adding the text to the string variable, then use that string variable as the Prompt in the MsgBox function:

CODE
Dim strPrompt As String

strPrompt = Data

'code code code

strPrompt = strPrompt & vbNewLine & Data

'etc

MsgBox strPrompt



The "object required" error means that you're referencing an object that doesn't exist.
User is offlineProfile CardPM
+Quote Post

jjsaw5
RE: Can Anyone Help Me?
30 Jul, 2008 - 04:30 AM
Post #3

I must break you
Group Icon

Joined: 4 Jan, 2008
Posts: 1,404



Thanked: 6 times
Dream Kudos: 125
Expert In: HTML, CSS, Database,

My Contributions
QUOTE(Zhalix @ 30 Jul, 2008 - 07:37 AM) *

In the future please encase your code within the [ code] [ /code] tags. smile.gif

When you say "all data", what exactly is "all the data"? A way to show a lot of data in a single MsgBox is by making a string variable and adding the text to the string variable, then use that string variable as the Prompt in the MsgBox function:

CODE
Dim strPrompt As String

strPrompt = Data

'code code code

strPrompt = strPrompt & vbNewLine & Data

'etc

MsgBox strPrompt



The "object required" error means that you're referencing an object that doesn't exist.




lol you told him to use code tags but you didn't tongue.gif
User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Can Anyone Help Me?
30 Jul, 2008 - 04:34 AM
Post #4

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
I didn't? ohmy.gif

EDIT
What's that block with "CODE" at the top? blink.gif

Are you talking about the fact that I didn't use the VB specific tags? mellow.gif

This post has been edited by Zhalix: 30 Jul, 2008 - 04:43 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 02:51PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month