Click here to Skip to main content
15,913,722 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneraltStartup Application Pin
ADY00721-Apr-05 7:33
ADY00721-Apr-05 7:33 
GeneralRe: tStartup Application Pin
Dave Kreskowiak21-Apr-05 7:41
mveDave Kreskowiak21-Apr-05 7:41 
QuestionHow to enable/disable & list network adapter in VB. Pin
BOOGIEMAN1ManClan21-Apr-05 6:16
BOOGIEMAN1ManClan21-Apr-05 6:16 
AnswerRe: How to enable/disable & list network adapter in VB. Pin
Dave Kreskowiak21-Apr-05 7:17
mveDave Kreskowiak21-Apr-05 7:17 
GeneralRe: How to enable/disable & list network adapter in VB. Pin
Anonymous21-Apr-05 7:21
Anonymous21-Apr-05 7:21 
GeneralRe: How to enable/disable & list network adapter in VB. Pin
Dave Kreskowiak21-Apr-05 7:32
mveDave Kreskowiak21-Apr-05 7:32 
GeneralRe: How to enable/disable & list network adapter in VB. Pin
Scott Serl21-Apr-05 8:32
Scott Serl21-Apr-05 8:32 
GeneralVariables, <>, and IF Statements Pin
Anonymous21-Apr-05 5:34
Anonymous21-Apr-05 5:34 
Option Explicit
Dim Num1 As Variant
Dim Num2 As Variant
Dim Num3 As Variant
Dim Seed As Variant
Dim Answer As Variant
Dim Counter As Variant
Dim Total As Variant
Dim Percent As Variant
Dim Response As Variant


Private Sub cmdExit_Click()
End
End Sub

Private Sub cmdNext_Click()
Num1 = 0
Num2 = 0
Num1 = lblNum1 + Num1
Num2 = lblNum2 + Num2
Num3 = Num1 + Num2
TxtResponse = Response
Counter = 0
Total = 0
If (Response <> Num3) Then
lblMessage = ("Wrong")
Total = Total + 1
End If
If (Response = Num3) Then
lblMessage = ("Correct")
Counter = Counter + 1
Total = Total + 1
End If
lblNum1 = Int(Rnd * 11)
lblNum2 = Int(Rnd * 11)

TxtResponse.Text = Format("")
lblScore = ((Counter / Total) * 100)
End Sub

Private Sub Form_Load()
Randomize Seed
Randomize Timer
Num1 = Int(Rnd * 11)
Num2 = Int(Rnd * 11)
lblNum1 = Num1
lblNum2 = Num2
End Sub

----------------------------------------------------
In this code there is an equation using if statements. This equation always evaluates to either true or false. The if statement doesn't alternate depending on the answer that is returned by the user. Is there anyway to get the If statement working propperly? Confused | :confused:
GeneralRe: Variables, &lt;&gt;, and IF Statements Pin
Dave Kreskowiak21-Apr-05 6:32
mveDave Kreskowiak21-Apr-05 6:32 
GeneralRe: Variables, &lt;&gt;, and IF Statements Pin
Anonymous21-Apr-05 6:49
Anonymous21-Apr-05 6:49 
GeneralRe: Variables, &lt;&gt;, and IF Statements Pin
Dave Kreskowiak21-Apr-05 7:30
mveDave Kreskowiak21-Apr-05 7:30 
GeneralRe: Variables, &lt;&gt;, and IF Statements Pin
Anonymous22-Apr-05 6:52
Anonymous22-Apr-05 6:52 
GeneralCR Help Pin
vertig073021-Apr-05 4:38
vertig073021-Apr-05 4:38 
GeneralRe: CR Help Pin
Jim Matthews21-Apr-05 5:20
Jim Matthews21-Apr-05 5:20 
GeneralRe: CR Help Pin
vertig073021-Apr-05 5:46
vertig073021-Apr-05 5:46 
GeneralRe: CR Help Pin
Jim Matthews21-Apr-05 8:04
Jim Matthews21-Apr-05 8:04 
GeneralRe: CR Help Pin
vertig073021-Apr-05 8:21
vertig073021-Apr-05 8:21 
Questionhow to use the WMA codec in my application? Pin
ndanya20-Apr-05 23:20
ndanya20-Apr-05 23:20 
GeneralPowerpoint Event Handling using VBA Pin
Mohan vijay20-Apr-05 23:02
Mohan vijay20-Apr-05 23:02 
GeneralRe: Powerpoint Event Handling using VBA Pin
Dave Kreskowiak21-Apr-05 7:48
mveDave Kreskowiak21-Apr-05 7:48 
GeneralRe: Powerpoint Event Handling using VBA Pin
Mohan vijay22-Apr-05 6:19
Mohan vijay22-Apr-05 6:19 
GeneralRe: Powerpoint Event Handling using VBA Pin
Dave Kreskowiak23-Apr-05 2:48
mveDave Kreskowiak23-Apr-05 2:48 
GeneralRe: Powerpoint Event Handling using VBA Pin
Mohan vijay25-Apr-05 2:35
Mohan vijay25-Apr-05 2:35 
GeneralFind the subfolder of the Outlook calendar Pin
M.Ilangovan20-Apr-05 22:16
M.Ilangovan20-Apr-05 22:16 
GeneralPicture box image brightness, contrast, saturation adjustments Pin
Member 176653520-Apr-05 21:15
Member 176653520-Apr-05 21:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.