<?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>Question Re: Reading Excel Cell values using VB script in Additional Q&amp;A</title>
    <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921884#M113802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the explanation and happy new year to all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Dec 2013 07:11:03 GMT</pubDate>
    <dc:creator>GirieshM</dc:creator>
    <dc:date>2013-12-31T07:11:03Z</dc:date>
    <item>
      <title>Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaq-p/9921866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently try to work on a blog where its aim to input the values from excel and based on the values it has to get the values from DB in sap and display it in the Output portion of the excel as mentioned in the following blog &lt;A _jive_internal="true" href="https://answers.sap.com/docs/DOC-31015"&gt;http://scn.sap.com/docs/DOC-31015&lt;/A&gt;. I have created the FM and done the basic things mentioned in the blog but I am facing an error "Run Tme Error '40036' Application-defined or object-defined error". Please find my code below and help to resolve the issue.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/348094" width="450" /&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 09:55:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaq-p/9921866</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2013-12-20T09:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921867#M113785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Giriesh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; it seems you should change &lt;STRONG&gt;Cells(6, "B")&lt;/STRONG&gt; for &lt;STRONG&gt;Cells(6, 2)&lt;/STRONG&gt; on the line where the error is.&lt;/P&gt;&lt;P&gt;Try changing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 13:10:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921867#M113785</guid>
      <dc:creator>michael_hobbins</dc:creator>
      <dc:date>2013-12-20T13:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921868#M113786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the prompt reply. Eventhough I change the entries as you mentioned as (6, 2) it is throwing the same error. Please see the below Screen Shot: &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/349230" width="450" /&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 06:10:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921868#M113786</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2013-12-23T06:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921869#M113787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Hello Giriesh, I tried to reproduce your error on that line and I couldn't. I misspelt ActiveSheet to see if I could force the error. What I got was the misspelt word hightlighted in blue, indicating there's something wrong there. On your printscreen there's no blue highlight. The red highlight you show is generated by adding an interruption point/breakpoint. Can you add one about 15 lines before the one you have now, run the sub/funtion and using F8 key advance line by line until you get to the line with the problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Michael&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 11:50:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921869#M113787</guid>
      <dc:creator>michael_hobbins</dc:creator>
      <dc:date>2013-12-23T11:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921870#M113788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and pls delete the existing breakpoint (just incase the red highlight is overlapping the blue highlight)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 11:53:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921870#M113788</guid>
      <dc:creator>michael_hobbins</dc:creator>
      <dc:date>2013-12-23T11:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921871#M113789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you mentioned the blue highlight is the compile error. But In my case I spelt it correct. Tried to debug it but getting the error only at the line "&lt;STRONG&gt;If ThisWorkbook.ActiveSheet.Cells(6, 2).Value &amp;lt;&amp;gt; " " Then&lt;/STRONG&gt;".&lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/408/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;. Unable to proceed further. Please find the below image:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/349688" width="450" /&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 14:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921871#M113789</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2013-12-23T14:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921872#M113790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you get the error, can you click debug and see on what line it stops? You should a yellow highligthed line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 14:37:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921872#M113790</guid>
      <dc:creator>michael_hobbins</dc:creator>
      <dc:date>2013-12-23T14:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921873#M113791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advance Christmas Wishes. Yup I checked by debugging and found the error in this line "&lt;STRONG&gt;If ThisWorkbook.ActiveSheet.Cells(6, 2).Value &amp;lt;&amp;gt; " " Then&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;Please find the below screenshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/350186" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 11:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921873#M113791</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2013-12-24T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921874#M113792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that there is a space between quotation marks. Case you want to ask for cell with no value replace the space.&lt;/P&gt;&lt;P&gt;Regards Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 12:58:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921874#M113792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-12-24T12:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921875#M113793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Michael Friedrich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried by removing the space within the quotes as &lt;STRONG&gt;If ThisWorkbook.ActiveSheet.Cells(6, 2).Value &amp;lt;&amp;gt; &lt;EM&gt;""&lt;/EM&gt; Then, &lt;/STRONG&gt;eventhough it is showing the same error. &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/350187" height="52" width="552" /&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 13:11:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921875#M113793</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2013-12-24T13:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921876#M113794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Dear Giriesh,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This is a long shot but try putting the following before the problematic line:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisWorkbook.Sheet1.Activate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or one by one i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisWorkbook.Activate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sheet1.Activate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way we can see where exactly the error come from the Excel object hierarchy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also try assigning the cell to a range object i.e:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DIm rng As Range&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rng = ThisWorkbook.ActiveSheet.Cells(6,2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If rng.Value &amp;lt;&amp;gt; "" Then etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let see what happen..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sayuti&lt;/P&gt;&lt;P&gt;p/s: Your username and password are visible in one of your screenshots. You may want to consider masking it next time..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 18:26:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921876#M113794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-12-24T18:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921877#M113795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I see you have your code in Sheet1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest to move this code into Module1. Then I guess you will not get any runtime error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 22:23:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921877#M113795</guid>
      <dc:creator>holger_khn</dc:creator>
      <dc:date>2013-12-24T22:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921878#M113796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Holger,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the 1st screenshot, it seems that the codes are already in Module1. Am referring to the VBE Titlebar and Watches Pane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sayuti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 05:58:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921878#M113796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-12-26T05:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921879#M113797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sayuti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assigned a variable RNG As range and assigned the workbook sheet value to it before to the check which done previously. Now the same error is throwed in the newly added line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Will mask the user id and pwd next time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2013 06:54:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921879#M113797</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2013-12-27T06:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921880#M113798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Giriesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any variables defined with reserve names e.g. Dim Application As Object or Dim Worksheet As Object.or something like that in your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you can change ActiveSheet to the specific sheet e.g. Sheet1 and see what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I googled the error msg and number, most of the results suggest that there is a glitch in Excel itself or a corrupted database and recommended a re-installs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you test your codes in a different PC?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sayuti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2013 10:04:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921880#M113798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-12-27T10:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921881#M113799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is Simply not possible for Excel to Parse that Code because There is no Existing for&lt;/P&gt;&lt;P&gt;ThisWorkbook.ActiveSheet.Cells...&lt;/P&gt;&lt;P&gt;Try it via AutoCompletion (or press "F1" in Context help)&lt;/P&gt;&lt;P&gt;If you set the Worksheet&amp;nbsp; in a Variable like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;dim sht as Worksheet&lt;/P&gt;&lt;P&gt;Set sht = "Tabelle1"&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;you can use it like that:;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;If sht.Cells(6,2).Value &amp;lt;&amp;gt; " "&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;greetings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2013 13:37:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921881#M113799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-12-27T13:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921882#M113800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have changed the code as below:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Code]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim sht as Worsheet&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sht = ThisWorkbook.Activesheet&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If sht.cells(6,2).Value &amp;lt;&amp;gt; " " then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End If&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[/CODE]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code works for me as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of assigning the ThisWorkbook.Activesheet to sht if I enter it directly as&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If ThisWorkbook.Activesheet.cells(6,2).Value &amp;lt;&amp;gt; " " then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End If&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It is throwing the above error. What is the reason behind assigning it to the variable and implementing it directly.&lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/408/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2013 11:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921882#M113800</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2013-12-30T11:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921883#M113801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Griesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its not assigning to a Variable - its making an Instance you are Assigning to an Object-&lt;/P&gt;&lt;P&gt;So in this Case you make an Instance of the Sheet-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Biggest difference is you can Handle it easier (as you can see)&lt;/P&gt;&lt;P&gt;and if there are more actions in the Sheet to perform you can also do like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;Dim sht as Worksheet&lt;/P&gt;
&lt;P&gt;Set sht = ThisWorkbook.ActiveSheet&lt;/P&gt;
&lt;P&gt;With sht&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if .Cells(6,2).Value &amp;lt;&amp;gt; "" Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...' Do Something&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;End with&lt;/P&gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Where are you running your code ?&lt;BR /&gt;From the VBA Editor per "F5" ?&lt;BR /&gt;This cant run---because the VBA Editor has no "ActiveSheet" from where it can Start &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add a Button to your Sheet and assign it to the Makro "GetAdress"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press the button and than ActiveSheet will run also without Setting to an Instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day (and a happy new year !)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas Bräutigam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2013 13:49:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921883#M113801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-12-30T13:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel Cell values using VB script</title>
      <link>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921884#M113802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the explanation and happy new year to all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Giriesh M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 07:11:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/reading-excel-cell-values-using-vb-script/qaa-p/9921884#M113802</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2013-12-31T07:11:03Z</dc:date>
    </item>
  </channel>
</rss>

