title: How do I solve the issue while entering data into tables in a website using VBA in excel?
body: <p>I am writing a VBA code to enter students' marks automatically from an excel sheet into a website. I am able to log in, navigate to the required page. But when I am trying to enter the marks using VBA into the table, I get the following error.
  Run-time error '91':
  &quot;Object variable or with block variable not set&quot;</p>
  <p>at the line:</p>
  <pre><code>doc.getElementById(celID).Value = ThisWorkbook.Sheets(&quot;Marks&quot;).Range(ceL).Value
  </code></pre>
  <p>where celID is obtained using: celID = &quot;marks-&quot; &amp; regno &amp; &quot;-&quot; &amp; qno and I get it as &quot;marks-171FA04001-1&quot;</p>
  <p>The HTML code for the page is:</p>
  <p><a href="https://docs.google.com/document/d/1Pt1mIqTFuDAVz8RyCqpTeDtB0Rb0Lu7dANsvetkiiV0/edit?usp=sharing" rel="nofollow noreferrer">Web page HTML code</a></p>
  <p>I need to verify the table's cell name and enter the marks because the name of the cell changes for different students like marks-rollno-questiono. So I need my code to verify if I am entering the marks for the respective student and for the respective question number. Please help me. I am using a for loop for entering the marks of all the questions of all the students.</p>
  <p><a href="https://docs.google.com/document/d/1wuIozFicaeyvJz84PAtQyT2zRk-q08XxGFToJrMwtVU/edit?usp=sharing" rel="nofollow noreferrer">VBA Code for Data Entry</a></p>
  <p>Screenshot of the table:</p>
  <p>![3]: <a href="https://i.stack.imgur.com/wIBL7.png" rel="nofollow noreferrer">https://i.stack.imgur.com/wIBL7.png</a></p>