Coding in support of this post
http://www.excelfox.com/forum/showth...ll=1#post11808


Code:
Option Explicit '
Sub txtfilesinworksheetwithFILENAMEColumnB() '  http://www.excelfox.com/forum/showthread.php/2392-VBA-Copy-files-in-excel-edit-and-save?p=11808&viewfull=1#post11808
Rem 1 Worksheets info
Dim WsFlNme As Worksheet
 Set WsFlNme = ThisWorkbook.Worksheets("FILENAME")
Rem 2 Copy .txt files in worksheets
'2a) Copy .txt files in worksheet with FILENAME (Column B)
'2a)(i) Get the entire text file as a string
Dim FileNum As Long: Let FileNum = FreeFile(1) ' The "highway/ street/ link" to be built to transport the text will be given a number. It must be unique. So we use for convenience, the Freefile function: it returns an integer that represents the next file number that the Open statement can use.  The optional argument for the range number is a variant that is used to specify a range from which the next free file number is returned. Enter a value of data type 0 (default) to return a file number in the range 1 - 255 inclusive. Enter 1 to return a file number in the range 256 - 511.   https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/freefile-function  . Note also : Use file numbers in the range 1-255, inclusive, for files not accessible to other applications. Use file numbers in the range 256-511 for files accessible from other applications
Dim PathAndFileName As String, strtxtFile As String
 Let PathAndFileName = ThisWorkbook.Path & "\vbadumb.txt"
  Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
    strtxtFile = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
    Get #FileNum, , strtxtFile                  'The  Get  statement reads back from an open route to data into the  given variable
  Close #FileNum
' Call WtchaGot(strtxtFile) '  ---   If we were to examine that string in strtxtFile, then we would see something like    "1" & vbCr & vbLf & "2" & vbCr & vbLf & "3"
Rem 3 Put the text data inti the (Windows clipboard)
Dim objDataObject As Object: Set objDataObject = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}") ' https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/dataobject-object   A holding area for formatted text data used in transfer operations. Also holds a list of formats corresponding to the pieces of text stored in the DataObject.   .....
'  .....A DataObject can contain one piece of text for the Clipboard text format, and one piece of text for each additional text format, such as custom and user-defined formats.  A DataObject is distinct from the Clipboard. A DataObject supports commands that involve the Clipboard and drag-and-drop actions for text. When you start an operation involving the Clipboard (such as GetText) or a drag-and-drop operation, the data involved in that operation is moved to a DataObject.   The DataObject works like the Clipboard. If you copy a text string to a DataObject, the DataObject stores the text string. If you copy a second string of the same format to the DataObject, the DataObject discards the first text string and stores a copy of the second string. It stores one piece of text of a specified format and keeps the text from the most recent operation.
objDataObject.SetText strtxtFile: objDataObject.PutInClipboard ' This often seems to result in putting infomation into the Windows Clipboard
Rem 4 Paste out to the worksheet
 WsFlNme.Paste Destination:=WsFlNme.Range("B1") ' If we paste the entire string in / at B1 , then the  vbCr & vbLf  in the string will be interpreted by Excel as the row seperator, so the entire string will be split over 3 lines
End Sub