Me.lblFilePath.Caption = "Reading file from: " & szValidPath Relevant if your ' going to incorporate a browse for file routine ' = ' Place the files name and path location into a label, just ' so you remember where your file came from. SzValidPath = szThisPath & szPathSep & szFileName ' = ' Variables for creating a path that the ' text file is expected to be in ' =Ĭonst szFileName As String = "ReadMe.txt" ![]() It takes some trial and ' error to figure on the formatting correctly so the contents can ' all be read. ' = ' Text file contents must have line breaks in certain spots so it ' can be read into the listbox correctly. ![]() The attached example reads a "ReadMe" file into the listbox on the form. Also read textfile's full of data into the listbox and then process lines that are needed instead of importing an entire file to a worksheet. An easy way to read a text file's contents into a listbox on a Userform.Ĭan be used to read a License agreement or ReadMe file into a listbox on a userform for the user to view.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |