View Single Post
  #1 (permalink)  
Old 10-20-2007, 09:45 PM
mikan mikan is offline
Novice
Join Date: Oct 2007
Posts: 3
iTrader: (0)
mikan is on a distinguished road
VB 2005 Hi all! Short little question on passing variable to textbox

//////edit: oct 22 solved. was making it lots harder than needed;
easier to call the textbox in each case. [returns are weeeeird]
don't know if that's a good explanation, but variables
pass through correctly and the whole program works now. thanks all ^______________^////

Hello I'm trying to write a program where the user enters a number in a message box, and values are calculated
through a function.
What I can't figure out is how to pass that calculated number [suppose it's a variable called quantity] to
a text box.
I do something like
quantity = (txtShipment.Text)

and get Message="Conversion from string "" to type 'Double' is not valid."

quantity is declared as a double, but I can't seem to figure this out. :/


Is there a way to go about this? Thank you muchly

edit::
after some editing, I now get a 0 in the textbox.
How can the variable pass through the function and display in a textbox?
It's going byref in the input data sub, and is byref in the function where the calculations are done.
Thanks in advance ^^;

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by mikan : 10-23-2007 at 12:05 AM. Reason: solved :D
Reply With Quote