text file printing problem Follow
So I have text file that has 20 lines for example. In each line there is 2 "," (Comma) that separate 3 different values. my intentions is that for each line in this text file there would be 1 label per line with the label having these 3 values from that one line in that one label. Resulting in 20 labels with each having different values, but the code that would execute this only shows the last line on every label that is supposed to be printed. These files are chosen through a form that has text input box.
The reason for this code is that within text file the lines change so much that from each other that bartender itself cannot keep up with the random increments that the text file has.
So my first question would be that is this even possible to do with bartender and if it is how can i accomplish this.
Here's a snipped from the code
Const ForReading = 1
Dim A, B, C
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
on error resume next
Set BarFile = ObjFSO.OpenTextFile("C:\Users\test.txt",ForReading)
if err.number <> 0 Then
on error goto 0
msgBox "Can’t find text file ."
strText = BarFile.ReadAll
msgbox "." & strText & "."
File = Split(strText, vbCrLf)
For Each strText in File
if StrText <> "" then
LBL = Split(strText, ",")
Format.NamedSubStrings("A ").Value = LBL(0)
msgbox "." & Format.NamedSubStrings("A ").Value & "."
Format.NamedSubStrings("B").Value = LBL(1)
msgbox "." & Format.NamedSubStrings("B").Value & "."
Format.NamedSubStrings("C").Value = LBL(2)
msgbox "." & Format.NamedSubStrings("C").Value & "."
Please sign in to leave a comment.