# Error found while using Invoke Code activity

**URL:** <https://forum.uipath.com/t/error-found-while-using-invoke-code-activity/91007>\
**Category:** Help\
**Tags:** system, activities\
**Created:** [January 28, 2019, 7:36am UTC](https://forum.uipath.com/t/error-found-while-using-invoke-code-activity/91007 "2019-01-28T07:36:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ying\_Zhen\_Lee](https://avatars.discourse-cdn.com/v4/letter/y/c6cbf5/32.png) [@Ying\_Zhen\_Lee](https://forum.uipath.com/u/Ying_Zhen_Lee)\
**Post date:** [January 28, 2019, 7:36am UTC](https://forum.uipath.com/t/error-found-while-using-invoke-code-activity/91007/1 "2019-01-28T07:36:20Z")

</div>

Hi,

I am trying to use the Invoke Code activity

 ![invoke_code](https://global.discourse-cdn.com/uipath/original/3X/0/2/029d31fd74e1e0d702525a261316c42ad60cbb8e.png)

These are the codes I took from online for testing and learning

Only the words ‘Set’ are underlined with error ‘Statement expected’

How do I solve this ?

Thank you

---

<div class="post-metadata">

**Author:** ![KarthikByggari](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/karthikbyggari/32/430060_2.png) [@KarthikByggari](https://forum.uipath.com/u/KarthikByggari)\
**Post date:** [January 28, 2019, 7:57am UTC](https://forum.uipath.com/t/error-found-while-using-invoke-code-activity/91007/2 "2019-01-28T07:57:09Z")

</div>

Hi @Ying_Zhen_Lee

The code which you written is VBA not [VB.Net](http://VB.Net).  
Invoke code works only with [VB.Net](http://VB.Net)  
That’s why the errors are appearing.

Regards,  
Karthik Byggari

---

<div class="post-metadata">

**Author:** ![Ying\_Zhen\_Lee](https://avatars.discourse-cdn.com/v4/letter/y/c6cbf5/32.png) [@Ying\_Zhen\_Lee](https://forum.uipath.com/u/Ying_Zhen_Lee)\
**Post date:** [January 28, 2019, 8:02am UTC](https://forum.uipath.com/t/error-found-while-using-invoke-code-activity/91007/3 "2019-01-28T08:02:20Z")

</div>

Hi @KarthikByggari,

Thank you for your reply! 😄

Now I understand the problem  
I will try out other methods

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [January 31, 2019, 8:02am UTC](https://forum.uipath.com/t/error-found-while-using-invoke-code-activity/91007/4 "2019-01-31T08:02:22Z")

</div>

Closed on January 31, 2019, 8:02am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
