AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 1,835
- Office Version
- 2019
- 2016
- Platform
- Windows
I've just found if I drag an html file into a worksheet cell A1, it displays perfectly as formatted text. All I need do is set the font colour to black.
I have several dozen of these files to work on, can I emulate the process in VBA? If I read in the file like so
What would be an instruction to copy Dat to a worksheet ?
Second question, with the text showing, I run this
The worksheet has an indent or margin on some rows but this is not reflected in the above code
I need to know this, how might I do that ?
Thanks for any help.
I have several dozen of these files to work on, can I emulate the process in VBA? If I read in the file like so
VBA Code:
ff = FreeFile
Open Path & "\file1.html" For Input As #ff
Dat = Input(LOF(ff), 1)
Close #ff
Second question, with the text showing, I run this
VBA Code:
Sub test()
For i = 7 To 13
Debug.Print Cells(i, "A")
Next
End Sub
I need to know this, how might I do that ?
Thanks for any help.