title: opening html file with vba
body: <p>I have some .html files which I want to read with vba. I wrote this codes to do what I want but I get </p>
  
  <blockquote>
    <p>object variable or with block variable not set</p>
  </blockquote>
  
  <p>error.</p>
  
  <pre><code>Dim arrListATA() As String
      Dim arrListTaskNo() As String
      Dim arrListDesc() As String
      Dim arrIssueNo() As String
      Dim arrIssueDate() As String
      Dim arrPartNo() As String
      Dim arrDMC() As String
      Dim arrApplicability() As String
      Dim arrDMCModelCode() As String
      Dim DMCs As String
      Dim arrSubTask() As String
      Dim subTasks As String
      Dim subs() As Variant
      Dim subs1 As String
  
     k = 0
  
     Dim objFile As Scripting.File
     Dim objFolder As Scripting.Folder
  
     Set objFSO = CreateObject("Scripting.FileSystemObject")
  w = 0
  m = 0
  b = 0
      Set fd = Application.FileDialog(msoFileDialogFolderPicker)
  
      With fd
      fd.Filters.Clear
       If fd.Show = -1 Then
       myTopFolderPath = fd.SelectedItems(1)
      Set objFolder = objFSO.GetFolder(myTopFolderPath)
      Dim arrSplitedDMC As Variant
      Dim arrSubTasks As Variant
          For Each objFile In objFolder.Files
          Debug.Print myTopFolderPath &amp; "\" &amp; objFile.Name
          If Right(objFile.Name, 4) = "html" And Len(objFile.Name) = 33 And Left(objFile.Name, 8) &lt;&gt; "V2500-00" Then
              Debug.Print myTopFolderPath &amp; "\" &amp; objFile.Name
              Workbooks.Open Filename:=myTopFolderPath &amp; "\" &amp; objFile.Name
              Debug.Print "Opened"
  
              lastrow = Cells(Rows.Count, 1).End(xlUp).Row
              taskCheckFlag = False
              myTemp = ""
              partNoFlag = False
              mySubTask = ""
  
              For i = 1 To lastrow
                  txt = Cells(i, 1)
              Next i
  </code></pre>
  
  <p>My folder path and my object names like this</p>
  
  <p><strong>C:\Users\ftk1187\Desktop\V2500 - Copy\V2500-00-70-72-02-00A-363A-D.html</strong></p>
  
  <p>It's not opening my .html files. How can I solve this problem?</p>