Click here to Skip to main content
15,912,457 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: .net framework Pin
Fernando Soto29-Apr-05 9:36
Fernando Soto29-Apr-05 9:36 
GeneralTransparent Form Pin
Joey Picerno29-Apr-05 8:27
Joey Picerno29-Apr-05 8:27 
GeneralRe: Transparent Form Pin
Suman Singh5-May-05 3:57
professionalSuman Singh5-May-05 3:57 
GeneralRe: Transparent Form Pin
Joey Picerno5-May-05 6:37
Joey Picerno5-May-05 6:37 
GeneralData call using Nokia PC Connectivity SDK 3.0 Pin
alexbetro29-Apr-05 5:35
alexbetro29-Apr-05 5:35 
GeneralSubclassing ListBox Pin
Andy H29-Apr-05 5:05
Andy H29-Apr-05 5:05 
GeneralBuild a cumbersome SQL String Pin
Joe Contreras29-Apr-05 3:25
sussJoe Contreras29-Apr-05 3:25 
GeneralSubscript out of range in vb6 Pin
husman29-Apr-05 2:49
husman29-Apr-05 2:49 
I trying to replace abc to def(TextFile)

Private Sub Command1_Click()
Call WriteToTxt("FlatFile", 2, "abc", "def")
End Sub

Public Sub WriteToTxt(strTable As String, intField As Integer, strFind As String, strReplace As String)

Dim intFileHandle As Integer
Dim intFileHandle2 As Integer
Dim strRETP As String
Dim sFieldArray As Variant
Dim found As Boolean

found = False
intFileHandle = FreeFile
Open "C:\" & strTable & ".txt" For Input As #intFileHandle
intFileHandle2 = FreeFile
Open "C:\" & strTable & ".txt.tmp" For Output As #intFileHandle2 ' temp file
While Not EOF(intFileHandle)
Line Input #intFileHandle, strRETP
If Not found Then
FieldArray = Split(strRETP, "|")
If FieldArray(0) = strFind Then (Im geting Error on this line saying Subscript out of range)
FieldArray(intField) = strReplace
strRETP = Join(FieldArray, "|")
found = True
End If
End If
Print #intFileHandle2, strRETP
Wend
Close #intFileHandle
Close #intFileHandle2
Kill "C:\" & strTable & ".txt" ' delete original
Name "C:\" & strTable & ".txt.tmp" As "C:\" & strTable & ".txt" ' rename temp file
End Sub
GeneralRe: Subscript out of range in vb6 Pin
Fernando Soto29-Apr-05 6:19
Fernando Soto29-Apr-05 6:19 
GeneralRe: Subscript out of range in vb6 Pin
Dave Kreskowiak29-Apr-05 6:26
mveDave Kreskowiak29-Apr-05 6:26 
GeneralRe: Subscript out of range in vb6 Pin
Fernando Soto29-Apr-05 6:41
Fernando Soto29-Apr-05 6:41 
GeneralRe: Subscript out of range in vb6 Pin
Dave Kreskowiak29-Apr-05 6:22
mveDave Kreskowiak29-Apr-05 6:22 
GeneralVbscript Quote Dilemma Pin
Anonymous29-Apr-05 2:38
Anonymous29-Apr-05 2:38 
GeneralRe: Vbscript Quote Dilemma Pin
Dave Kreskowiak29-Apr-05 6:10
mveDave Kreskowiak29-Apr-05 6:10 
QuestionHow to fetch primary key field Pin
Suman Singh29-Apr-05 0:40
professionalSuman Singh29-Apr-05 0:40 
AnswerRe: How to fetch primary key field Pin
Colin Angus Mackay29-Apr-05 2:05
Colin Angus Mackay29-Apr-05 2:05 
GeneralRe: How to fetch primary key field Pin
Suman Singh5-May-05 3:55
professionalSuman Singh5-May-05 3:55 
GeneralRe: How to fetch primary key field Pin
Colin Angus Mackay5-May-05 4:14
Colin Angus Mackay5-May-05 4:14 
GeneralRe: How to fetch primary key field Pin
Suman Singh6-May-05 8:26
professionalSuman Singh6-May-05 8:26 
GeneralRefreshing graphics with GDI+ Pin
leoprex28-Apr-05 23:34
leoprex28-Apr-05 23:34 
GeneralSMS Pin
Anonymous28-Apr-05 17:16
Anonymous28-Apr-05 17:16 
GeneralRe: SMS Pin
Dave Kreskowiak29-Apr-05 2:05
mveDave Kreskowiak29-Apr-05 2:05 
GeneralIntegrate AppConfig file Pin
Joey Picerno28-Apr-05 16:55
Joey Picerno28-Apr-05 16:55 
GeneralRe: Integrate AppConfig file Pin
rudy.net28-Apr-05 18:13
rudy.net28-Apr-05 18:13 
GeneralRe: Integrate AppConfig file Pin
Len Miller28-Apr-05 19:56
Len Miller28-Apr-05 19:56 

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.