<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Populate Textbox with excel cell value in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/populate-textbox-with-excel-cell-value/m-p/463834#M12561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can open the excel file i want to get the data from but im not sure how to get the corrisponding values into the user form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code i have to open excel via button click:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Private Sub OpenNewWarrant()
Dim VolDate As Date
Dim xlApp As Object&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set xlApp = CreateObject("excel.application")
&amp;nbsp;&amp;nbsp;&amp;nbsp; xlApp.Visible = True
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set myfile = xlApp.Workbooks.Open("C:\AirPhoto\Test.xls") 'etc...
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set xlApp = Nothing&amp;nbsp;&amp;nbsp;&amp;nbsp; ' the application, then release the reference.

End Sub&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im thinking something like this but obviously it needs to be tweaked...&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; tb6.Value = myfile.Workbooks.ActiveSheet("C8").Value &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Dec 2010 18:53:41 GMT</pubDate>
    <dc:creator>ColbyParnell</dc:creator>
    <dc:date>2010-12-30T18:53:41Z</dc:date>
    <item>
      <title>Populate Textbox with excel cell value</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/populate-textbox-with-excel-cell-value/m-p/463834#M12561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can open the excel file i want to get the data from but im not sure how to get the corrisponding values into the user form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code i have to open excel via button click:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Private Sub OpenNewWarrant()
Dim VolDate As Date
Dim xlApp As Object&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set xlApp = CreateObject("excel.application")
&amp;nbsp;&amp;nbsp;&amp;nbsp; xlApp.Visible = True
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set myfile = xlApp.Workbooks.Open("C:\AirPhoto\Test.xls") 'etc...
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set xlApp = Nothing&amp;nbsp;&amp;nbsp;&amp;nbsp; ' the application, then release the reference.

End Sub&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im thinking something like this but obviously it needs to be tweaked...&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; tb6.Value = myfile.Workbooks.ActiveSheet("C8").Value &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 18:53:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/populate-textbox-with-excel-cell-value/m-p/463834#M12561</guid>
      <dc:creator>ColbyParnell</dc:creator>
      <dc:date>2010-12-30T18:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Textbox with excel cell value</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/populate-textbox-with-excel-cell-value/m-p/463835#M12562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok so if i open the file and populate right away this works like a charm:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Private Sub CommandButton1_Click()
Dim xlApp As Object
Dim myfile As ExcelWorkspaceFactory


&amp;nbsp;&amp;nbsp;&amp;nbsp; Set xlApp = CreateObject("excel.application")
&amp;nbsp;&amp;nbsp;&amp;nbsp; xlApp.Visible = True

&amp;nbsp;&amp;nbsp;&amp;nbsp; Set myfile = xlApp.Workbooks.Open("C:\AirPhoto\Test.xls")
&amp;nbsp;&amp;nbsp;&amp;nbsp; tb6.Value = xlApp.ActiveWorkbook.Sheets("sheet1").Range("C8").Value&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if i change something in the cell and try to update it returns an error of: runtime error 91 Object variable or with block variable not set&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:36:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/populate-textbox-with-excel-cell-value/m-p/463835#M12562</guid>
      <dc:creator>ColbyParnell</dc:creator>
      <dc:date>2021-12-11T20:36:16Z</dc:date>
    </item>
  </channel>
</rss>

