# Passing variable from Visual Basic

**URL:** <https://forum.kirupa.com/t/passing-variable-from-visual-basic/248273>\
**Category:** flash\
**Created:** [January 6, 2008, 11:20am UTC](https://forum.kirupa.com/t/passing-variable-from-visual-basic/248273 "2008-01-06T11:20:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boxfish333](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@boxfish333](https://forum.kirupa.com/u/boxfish333)\
**Post date:** [January 6, 2008, 11:20am UTC](https://forum.kirupa.com/t/passing-variable-from-visual-basic/248273/1 "2008-01-06T11:20:40Z")

</div>

Hi everyone, new to the forums and need some help…

Basically, I am trying to fill a variable from Visual Basic and display in a textbox. This was easy in AS2:

Using AS2, I created a dynamic textbox and assigned it a variable name (i.e. var was “fromVB”). In Visual Basic, I used the SetVariable function to fill the textbox.

With AS3, I created a dynamic textbox with instance name “testField” and have the following code.

var fromVB:String;  
fromVB = “”;  
testField.text = fromVB

However, I can’t get the textbox to fill with variable “fromVB”  
I gave it the blank value “” because it initially requires some value.

Probably a simple and obvious solution. but i’m a total newbie…  
Any help appreciated…
