Click here to Skip to main content
16,006,341 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Invalid Operation Exception was unhandled Pin
Dave Kreskowiak11-Oct-06 5:43
mveDave Kreskowiak11-Oct-06 5:43 
GeneralRe: Invalid Operation Exception was unhandled Pin
UltraCoder11-Oct-06 8:50
UltraCoder11-Oct-06 8:50 
GeneralRe: Invalid Operation Exception was unhandled Pin
Dave Kreskowiak11-Oct-06 11:35
mveDave Kreskowiak11-Oct-06 11:35 
GeneralRe: Invalid Operation Exception was unhandled Pin
UltraCoder11-Oct-06 12:13
UltraCoder11-Oct-06 12:13 
QuestionLocked Access database Pin
aransiola10-Oct-06 8:55
aransiola10-Oct-06 8:55 
AnswerRe: Locked Access database Pin
Tad McClellan10-Oct-06 18:11
professionalTad McClellan10-Oct-06 18:11 
QuestionRe: Locked Access database Pin
aransiola10-Oct-06 22:26
aransiola10-Oct-06 22:26 
Questionascending/discending [modified] Pin
Ultima Reborn10-Oct-06 6:20
Ultima Reborn10-Oct-06 6:20 
Hi there,

was giving a task today to find out how to make a program where we have 3 text boxes and it sorts the numbers in these boxes into asceding/discending order but im kinda having trouble with it, tryed searching but couldnt find anything. can someone lend a hand or point in the direction to go

also here is a screenshot

http://www.ultima-ws.ath.cx/files/vb.jpg

thanks

Option Strict On
Public Class Form1
    Dim rlmemory1 As Single
    Dim rlmemory2 As Single
    Dim rlmemory3 As Single
    Dim rlinput1 As Single
    Dim rlinput2 As Single
    Dim rlinput3 As Single

    Private Sub btnAsc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAsc.Click
        rlinput1 = CSng(txtInput1.Text)
        rlinput2 = CSng(txtInput2.Text)
        rlinput3 = CSng(txtInput3.Text)

        rlmemory1 = rlinput1
        rlmemory2 = rlinput2
        rlmemory3 = rlinput

        If IsNumeric(txtInput1.Text) = False Then
            MsgBox("Please input numeric value to input1")
        ElseIf IsNumeric(txtInput2.Text) = False Then
            MsgBox("Please input numeric value to input2")
        ElseIf IsNumeric(txtInput3.Text) = False Then
            MsgBox("Please input numeric value to input3")
        End If

            If rlmemory3 > rlmemory1 Then
                txtInput1.Text = CStr(rlmemory3)
                txtInput3.Text = CStr(rlmemory1)
            End If

            If rlmemory2 > rlmemory1 Then
                txtInput1.Text = CStr(rlmemory2)
                txtInput2.Text = CStr(rlmemory1)
            End If

            If rlmemory3 > rlmemory2 Then
                txtInput2.Text = CStr(rlmemory3)
                txtInput3.Text = CStr(rlmemory2)
        End If

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        rlmemory1 = 0
        rlmemory2 = 0
        rlmemory3 = 0

    End Sub
End Class



-- modified at 12:29 Tuesday 10th October, 2006
AnswerRe: ascending/discending Pin
dptalt10-Oct-06 6:50
dptalt10-Oct-06 6:50 
GeneralRe: ascending/discending [modified] Pin
Ultima Reborn10-Oct-06 7:25
Ultima Reborn10-Oct-06 7:25 
QuestionRe: ascending/discending Pin
Ultima Reborn12-Oct-06 11:42
Ultima Reborn12-Oct-06 11:42 
QuestionVB.Net and SQL Statements Pin
directred10-Oct-06 5:11
directred10-Oct-06 5:11 
AnswerRe: VB.Net and SQL Statements Pin
mr_lasseter10-Oct-06 6:49
mr_lasseter10-Oct-06 6:49 
AnswerRe: VB.Net and SQL Statements Pin
James Foxall10-Oct-06 9:50
James Foxall10-Oct-06 9:50 
QuestionCrystal Report XI Pin
ihe10-Oct-06 3:56
ihe10-Oct-06 3:56 
AnswerRe: Crystal Report XI Pin
Steven J Jowett10-Oct-06 6:02
Steven J Jowett10-Oct-06 6:02 
GeneralRe: Crystal Report XI Pin
ihe11-Oct-06 0:30
ihe11-Oct-06 0:30 
QuestionHow to create a calculator in VB (using RPN) Pin
Wrycu10-Oct-06 3:55
Wrycu10-Oct-06 3:55 
QuestionMy ComboBox class events do not fire Pin
dptalt10-Oct-06 3:42
dptalt10-Oct-06 3:42 
AnswerRe: My ComboBox class events do not fire Pin
James Foxall10-Oct-06 9:51
James Foxall10-Oct-06 9:51 
GeneralRe: My ComboBox class events do not fire Pin
dptalt11-Oct-06 3:13
dptalt11-Oct-06 3:13 
GeneralRe: My ComboBox class events do not fire Pin
James Foxall11-Oct-06 3:23
James Foxall11-Oct-06 3:23 
GeneralRe: My ComboBox class events do not fire Pin
dptalt11-Oct-06 3:53
dptalt11-Oct-06 3:53 
GeneralRe: My ComboBox class events do not fire Pin
James Foxall11-Oct-06 3:56
James Foxall11-Oct-06 3:56 
GeneralRe: My ComboBox class events do not fire Pin
dptalt11-Oct-06 4:47
dptalt11-Oct-06 4:47 

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.