Click here to Skip to main content
15,890,282 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Auto Scroll [modified] Pin
HelpMePlease!25-Jul-07 7:20
HelpMePlease!25-Jul-07 7:20 
GeneralRe: Auto Scroll Pin
Dave Kreskowiak25-Jul-07 7:35
mveDave Kreskowiak25-Jul-07 7:35 
AnswerRe: Auto Scroll Pin
Luc Pattyn25-Jul-07 11:58
sitebuilderLuc Pattyn25-Jul-07 11:58 
QuestionHow to populate a treeview from a File Pin
Edward LaPinski25-Jul-07 5:41
Edward LaPinski25-Jul-07 5:41 
AnswerRe: How to populate a treeview from a File Pin
Dave Kreskowiak25-Jul-07 7:01
mveDave Kreskowiak25-Jul-07 7:01 
GeneralRe: How to populate a treeview from a File Pin
Edward LaPinski27-Jul-07 11:04
Edward LaPinski27-Jul-07 11:04 
GeneralRe: How to populate a treeview from a File Pin
Dave Kreskowiak28-Jul-07 13:12
mveDave Kreskowiak28-Jul-07 13:12 
Questionhow can i reuse this code with multi text boxes w/o rewriting it [modified] Pin
Jeffrey Shane25-Jul-07 5:34
Jeffrey Shane25-Jul-07 5:34 
I want to reuse some code this piece of code once:
<code>  Try
            If txt78.Text.Length = 0 Then
                Call LabelCheck(78)
            Else
                If txt78.Text.Length <> 0 Then
                    Call UpdateMath(78)
                    If cm_intCompare78 <> txt78.Text Then
                        Call UpdateQuery(78)
                        If intCurrentCount >= 1000 Then
                            cm_intCompare78 = intCurrentCount - 1000
                        Else
                            cm_intCompare78 = intCurrentCount
                        End If
                    End If
                End If
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try</code>


But the issue is that i have use this piece of code 14 times. What i would like to is something like this:

dim strTime as string
Try
            If txt & strTime &.Text.Length = 0 Then
                Call LabelCheck(strTime)
            Else
                If txt78.Text.Length <> 0 Then
                    Call UpdateMath(strTime)
                    If cm_intCompare & strTime <> txt & strTime &.Text Then
                        Call UpdateQuery(strTime)
                        If intCurrentCount >= 1000 Then
                            cm_intCompare & strTime = intCurrentCount - 1000
                        Else
                            cm_intCompare & strTime = intCurrentCount
                        End If
                    End If
                End If
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try


In thoery this should work but doesnot.. I have tryed to us string.concat but it doesnot work. Does anyone have any Ideas how i can do this?
Thank you
Shane






-- modified at 12:47 Wednesday 25th July, 2007
AnswerRe: I need help, please Pin
leckey25-Jul-07 6:15
leckey25-Jul-07 6:15 
GeneralRe: how can reuse code with multi text boxes w/o rewriting it Pin
Jeffrey Shane25-Jul-07 6:46
Jeffrey Shane25-Jul-07 6:46 
AnswerRe: how can i reuse this code with multi text boxes w/o rewriting it Pin
Dave Kreskowiak25-Jul-07 7:00
mveDave Kreskowiak25-Jul-07 7:00 
AnswerRe: how can i reuse this code with multi text boxes w/o rewriting it Pin
mr_lasseter25-Jul-07 7:06
mr_lasseter25-Jul-07 7:06 
QuestionConnection string Pin
dcode2525-Jul-07 5:25
dcode2525-Jul-07 5:25 
AnswerRe: Connection string Pin
Paul Conrad25-Jul-07 6:20
professionalPaul Conrad25-Jul-07 6:20 
GeneralRe: Connection string Pin
penguin500025-Jul-07 11:03
penguin500025-Jul-07 11:03 
GeneralRe: Connection string Pin
dcode2525-Jul-07 14:38
dcode2525-Jul-07 14:38 
GeneralRe: Connection string Pin
Paul Conrad25-Jul-07 15:55
professionalPaul Conrad25-Jul-07 15:55 
GeneralRe: Connection string Pin
dcode2526-Jul-07 3:32
dcode2526-Jul-07 3:32 
GeneralRe: Connection string Pin
Paul Conrad26-Jul-07 5:18
professionalPaul Conrad26-Jul-07 5:18 
QuestionIs there any replace file dialog/form in .net? Pin
H3rman25-Jul-07 4:26
H3rman25-Jul-07 4:26 
AnswerRe: Is there any replace file dialog/form in .net? Pin
Dave Kreskowiak25-Jul-07 6:56
mveDave Kreskowiak25-Jul-07 6:56 
QuestionCannot create Web Site in VS 2005 Pin
DJamesRange25-Jul-07 4:03
DJamesRange25-Jul-07 4:03 
AnswerRe: Cannot create Web Site in VS 2005 Pin
Paul Conrad25-Jul-07 6:21
professionalPaul Conrad25-Jul-07 6:21 
Questionhow to know my IP and write it in a label Pin
saadmechiche25-Jul-07 3:58
saadmechiche25-Jul-07 3:58 
AnswerRe: how to know my IP and write it in a label Pin
Tom Deketelaere25-Jul-07 4:20
professionalTom Deketelaere25-Jul-07 4:20 

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.