Hey guys.
Here's the structure of my file :
A_____ B_____
Name1 Content1
Name2 Content2
I would like to create a file for each row, called "Name1.html" and with content "Content1". Nothing too complicated but I have too many to do it one by one.
Here's what I tried. It gives me no result, like nothing happened. Could you tell me what's wrong ?
Sub CreateTxtFiles()
Dim rng As Range
Dim ff As Long
Dim LastRow As Long
Dim I As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
For I = 1 To LastRow
Set rng = Range("B" & I)
ff = FreeFile()
Open "Macintosh HD:Users:Moop:Desktop" & rng.Address(0, 0) & ".html" For Output As #ff
Print #ff, rng.Value
Close #ff
Next I
End Sub
Thanks
Bookmarks