•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 402,631 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,211 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Swaps Two Elements Of An Array (So that say, indice1's value would become indice2's value, and vice versa). Simple Code Piece Really...
Public Sub Swap(ByRef AName() As String, Indice1 As Integer, Indice2 As Integer) Dim tmp As String ' /* Set The Temporary Variable To The Value Of The First Passed Indice */ tmp = AName(Indice1) ' /* Replace The Value Of The First Passed Indice, With The Value Of The Second */ AName(Indice1) = AName(Indice2) ' /* Set The Value Of The Second Passed Indice, To The Value Of The First Passed Indice */ AName(Indice2) = tmp End Sub
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)