Public Sub WriteDataToTxtFile()
Dim objDaOb As Object
Dim rngCOPY As Range
Dim strPath As String
Set objDaOb = CreateObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
Set rngCOPY = Range("B2:C8") 'Set Range Reference
strPath = "C:\Test.txt" 'Set text file path
rngCOPY.Copy
objDaOb.GetFromClipboard
Open strPath For Output As #1
Print #1, objDaOb.GetText
Close #1
Application.CutCopyMode = False
End Sub
I had tested the code with false data and it did work so not sure what is different in your setup that fails it. Can you post the code as you have now?taurean - that didn't seem to work. when i go to my txt file it is not updated with the same data that is in excel.