+ Reply to Thread
Results 1 to 3 of 3

multi-line output on msgbox

Hybrid View

  1. #1
    Registered User
    Join Date
    06-21-2007
    Location
    Vancouver, Canada
    Posts
    74

    multi-line output on msgbox

    Given the code below:

    'Open the CSV data file for reading
            Set fs = CreateObject("Scripting.FileSystemObject") 'set the file system to the entire drive
            Set f = fs.opentextfile(filepath, ForReading, TristateUseDefault) _
                 'set file using filepath and file system set above
                 
            While Not f.AtEndOfStream       'proceed with the following until end of file is reached
                s = f.readline              'read in a line of data from .csv file
                If s <> "" Then             'if the line is not blank
                    vline = Split(s, ",")   'create comma delimited array from .csv row
                    'want a msgbox command that would print all the entries in vline here
                End If 'if s <> ""
            Wend 'while not f.AtEndOfStream
    What command/code would allow me to print all the entries in vline regardless of the size of the comma delimited array? Thanks.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835
    try
    MsgBox Join(vline)
    or
    MsgBox Join(vline, vbLf)

  3. #3
    Registered User
    Join Date
    06-21-2007
    Location
    Vancouver, Canada
    Posts
    74
    Thanks jindon. The line worked perfectly as expected.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1