Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21089

[RESOLVED] saving all textboxes

$
0
0
hi
on my form it creates some html pages in a textbox at runtime
this looks on forms and lists all known textboxes
i just need to save them all
its finding them ok

Code:

Dim lines() As String, i As Integer
Dim txt_Name As String
Dim Txt As Control
For Each Txt In Controls
If TypeOf Txt Is TextBox Then
Open App.Path & "\SvrHtml\" & Txt.Name & ".html" For Output As #1
 lines() = Split(Txt.Name , vbCrLf)    ''' wont work but any other textbox "name" without the .text will
For i = 0 To UBound(lines)
Print #1, lines(i)
Next
  Close #1
End If
Next


if i change the Txt.Name to Text1 etc it saves that box ok

a bit confused where im going wrong

Viewing all articles
Browse latest Browse all 21089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>