mikeybabes
New Member
- Joined
- Dec 8, 2015
- Messages
- 4
I have some relatively small HTML files, pretty much plain text in UTF-8 format. But no matter what I'm unable to get to load into a string.
I've scanned everywhere Microsoft own help documents are pretty US.
I could use copy/paste, but there is no fun in this, and also I have 200+ files which I will import from.
The failure is the Open Filename.
Anyone have an idea on this simple project, your help is appreciated.
I've scanned everywhere Microsoft own help documents are pretty US.
I could use copy/paste, but there is no fun in this, and also I have 200+ files which I will import from.
Code:
Sub InsertHTML()
Dim htFilename As Variant
Dim r As Long
Dim Filename As String
Dim Filenum As Integer
Dim strString As String
Dim iPtr As Long
iRow = 1
ICol = xColIndex = Application.ActiveCell.Column
htFilename = Application.GetOpenFilename(FileFilter:="HTML files (*.html), *.html", MultiSelect:=True)
If Not IsArray(htFilename) Then Exit Sub
For iPtr = LBound(htFilename) To UBound(htFilename)
Filename = htFilename(iPtr)
Open Filename For Input As [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=1]#1[/URL]
Get [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=1]#1[/URL] , , strString
Close [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=1]#1[/URL]
Cells(iRow, ICol).Value = strString
iRow = iRow + 1
Next iPtr
End Sub
The failure is the Open Filename.
Anyone have an idea on this simple project, your help is appreciated.