Hi
I have been triying to write some code that creates an individual txt file from a cell's contents and saves it in a specified filepath (for a collection of cells I have put in a named range). Easy enough using Excel on my PC, however when I use a Mac (like the person I'm writing the code for) I receive Error 429 as the code I'm using clearly uses ActiveX which is not supported on Macs.
How do I modify the code so it will work on a Mac?
I have pasted the code I have writted below for reference, I would be sincerely grateful for any help with the matter. Please let me know if any additional information is needed.
Thanks in advance
Sub Export_Text2()
Dim i As Integer
For i = 1 To Range("N").Value
Set txtApp = CreateObject("Scripting.FileSystemObject")
Set txtDoc = txtApp.CreateTextFile(Range("FileNames")(i, 1).Value, True)
txtDoc.WriteLine (Range("Text")(i, 1).Value)
txtDoc.Close
Next i
End Sub
Bookmarks