My Script...Doesn't Seem to Work 
Author Message
 My Script...Doesn't Seem to Work

Here's what I got.....

Option Explicit
Public FinalValue1, FinalValue2, NumberA, NumberB, Final As Integer

Sub CommandButton1_Click()
FinalValue1 = Int((20 * Rnd) + 1)
Label1 = FinalValue1
FinalValue2 = Int((20 * Rnd) + 1)
Label2 = FinalValue2
End Sub

Sub CommandButton2_Click()
NumberA = 0
NumberB = 0
FinalValue1 = 0
FinalValue2 = 0
 Final = UserForm3.FinalValue1.Value * 1 + UserForm3.FinalValue1.Value * 1
If TextBox1 = Final Then
MsgBox "Correct Answer! Nice Job!"
Else
MsgBox "Incorrect Answer! Nice Try!"
End If
End Sub

Private Sub Label2_Click()

End Sub

Private Sub UserForm_Click()

End Sub
--------------------------------------
Only problem is i keep getting an error, whenever i click the "Check It!"
Button...Here's what it says, "object required" with This line
highlighted,"Final = UserForm3.FinalValue1.Value * 1 +
UserForm3.FinalValue1.Value * 1"  Can someone please look at this any give
any ideas/suggestions. Thanks.



Mon, 16 Dec 2002 03:00:00 GMT  
 My Script...Doesn't Seem to Work
Try writing each of your declarations on a sepate line or specifying "as
Integer" after each variable name. As writen you have declared 4 variants
and 1 integer varables. This may not solve your problem, however its a first
step in making your code more correct.

--

Hope this helps, John
http://belyea.dyndns.org

Quote:
> Here's what I got.....

> Option Explicit
> Public FinalValue1, FinalValue2, NumberA, NumberB, Final As Integer

> Sub CommandButton1_Click()
> FinalValue1 = Int((20 * Rnd) + 1)
> Label1 = FinalValue1
> FinalValue2 = Int((20 * Rnd) + 1)
> Label2 = FinalValue2
> End Sub

> Sub CommandButton2_Click()
> NumberA = 0
> NumberB = 0
> FinalValue1 = 0
> FinalValue2 = 0
>  Final = UserForm3.FinalValue1.Value * 1 + UserForm3.FinalValue1.Value * 1
> If TextBox1 = Final Then
> MsgBox "Correct Answer! Nice Job!"
> Else
> MsgBox "Incorrect Answer! Nice Try!"
> End If
> End Sub

> Private Sub Label2_Click()

> End Sub

> Private Sub UserForm_Click()

> End Sub
> --------------------------------------
> Only problem is i keep getting an error, whenever i click the "Check It!"
> Button...Here's what it says, "object required" with This line
> highlighted,"Final = UserForm3.FinalValue1.Value * 1 +
> UserForm3.FinalValue1.Value * 1"  Can someone please look at this any give
> any ideas/suggestions. Thanks.



Tue, 17 Dec 2002 03:00:00 GMT  
 My Script...Doesn't Seem to Work
Thanks for reply John, I did exactly what you told me and I got past that
first error. However, now I get a "invalid qualifier" and it highlights
'.FinalValue1'.
hope you can help me some more.

Quote:
> Try writing each of your declarations on a sepate line or specifying "as
> Integer" after each variable name. As writen you have declared 4 variants
> and 1 integer varables. This may not solve your problem, however its a
first
> step in making your code more correct.

> --

> Hope this helps, John
> http://belyea.dyndns.org


> > Here's what I got.....

> > Option Explicit
> > Public FinalValue1, FinalValue2, NumberA, NumberB, Final As Integer

> > Sub CommandButton1_Click()
> > FinalValue1 = Int((20 * Rnd) + 1)
> > Label1 = FinalValue1
> > FinalValue2 = Int((20 * Rnd) + 1)
> > Label2 = FinalValue2
> > End Sub

> > Sub CommandButton2_Click()
> > NumberA = 0
> > NumberB = 0
> > FinalValue1 = 0
> > FinalValue2 = 0
> >  Final = UserForm3.FinalValue1.Value * 1 + UserForm3.FinalValue1.Value *
1
> > If TextBox1 = Final Then
> > MsgBox "Correct Answer! Nice Job!"
> > Else
> > MsgBox "Incorrect Answer! Nice Try!"
> > End If
> > End Sub

> > Private Sub Label2_Click()

> > End Sub

> > Private Sub UserForm_Click()

> > End Sub
> > --------------------------------------
> > Only problem is i keep getting an error, whenever i click the "Check
It!"
> > Button...Here's what it says, "object required" with This line
> > highlighted,"Final = UserForm3.FinalValue1.Value * 1 +
> > UserForm3.FinalValue1.Value * 1"  Can someone please look at this any
give
> > any ideas/suggestions. Thanks.



Tue, 17 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. define a measurement doesn't seem to work

2. location.replace doesn't seem to work

3. comparisons between decimal and hex values doesn't seem to work

4. response.expires doesn't seem to work!

5. CDONTS.DLL doesn't seem to work.

6. STMAdmin.dll to query NT Log doesn't seem to work properly

7. focus() doesn't seem to work in IE-6

8. HitTest doesn't seem to work as expected

9. FormField.EntryMacro doesn't seem to work

10. AddHandler doesn't seem to work

11. AppActivate doesn't seem to work with SendKeys

12. AddHandler doesn't seem to work

 

 
Powered by phpBB® Forum Software