![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| 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 calculatedthrough 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 ^^; Last edited by mikan : 10-23-2007 at 12:05 AM. Reason: solved :D |
| |
| The Following User Says Thank You to Lee For This Useful Post: | ||
HelloWorld (10-21-2007) | ||
| |||
| Edit oct 22: !! Oh right, will fix the variable name and return from the function. Hmm.. Will update post with future problem once that's figured out. ~~~~ Ok, thanks. What I aim to do is take the variable of the input box and pass it down a procedure. Somehow the value isn't being processed through to the calculation. These are some pieces: Quote:
Quote:
Quote:
Last edited by mikan : 10-22-2007 at 05:08 PM. Reason: ~~partial solve |
| The Following User Says Thank You to mikan For This Useful Post: | ||
HelloWorld (10-21-2007) | ||
| |||
| whew, solved. seems to be so far, anyway :^_^: prob not the best solution, but figured to just call the textbox up in each case instead. don't know how to explain it, though, esp if this isn't the best answer. |
![]() |
| Thread Tools | |
| Display Modes | |
| |