Textbox data entry question

rjointern

New member
Joined
Jun 15, 2006
Messages
4
Programming Experience
Beginner
hrm... ok so i'm going to try my best to word this appropriately but please go easy.. i'm a beginner at vs2005 and I've searched for the solution for like five hours already...

ok..

first things first.. i've created a second form which would allow me to input some data. The desired data will be a combination of both strings and numbers... [i'm trying to get user defined excel cell locations]. I've been trying to allocate the user inputted data from these textboxes by using the formula.... var = textbox1.text or whatever... I have this called in the btn_click sub routine, but i get the error... can't convert string to integer... which is most likely caused by the combo of strings and numerals.. so I was wondering how do i solve this?

also... The textbox.text doesn't seem to bind my inputted data into my variables.. when i try to msgbox the inputed data being stored into the variables.. it doesn't show up at all..

gosh, I hope i made some sense, I've been searching on this topic for the past five hours... I am frustrated. please help.

thnx
 
If your looking for alphnumeric input then why are you trying to convert it to an Integer? If you want to break the input into two parts then you either need to use a single control and break up the entered value or else use two controls. When I've asked the user for Excel cell addresses before I've used a DomainUpDown for the column name and a NumericUpDown for the row number. This means that there is no validation or conversion necessary as the controls do it all for you.
 
Thanks for replying,

Hrm, upon reading your statement over three times I'm beginning to get more confused. Sorry! I will do more research on the controls you talked about... if possible can you please show some sample code? I appreciate your time and effort. Oh btw, I'm not trying to convert it into an integer... Idk if I implied that... I'm just getting that error. I'm confused as to why that is happening. I thought that there was a proper data type to let me store data with numbers and letters, but I suppose I'm mistaken.

Thanks.
 
Last edited:
A String object contains characters, be they letters, digits or other characters. There is no type specifically for letters and digits. You saing that the error message said that you couldn't convert a string to an integer so obviously you were trying to do just that.
 
hrm... interesting..

here's what I'm trying to do

I've got two forms, a main form and an input form. The input form has several textboxes. I've declared a variable as a string. I've set the textbox equal to the string. ie. variable = textbox1.text is this not correct? The data i'm entering into the textbox is... a23 or b52 or am23 etc. it's a combination of letters and numerals, which a string shuold be capable of... but I've gotten that error.

Right now I can't even get the text to stay in the variable. I really dunno what I am doing wrong. Please bare with me, I'm very new to this. I thank you for your help.

Also, I'm not intentionally trying to convert a string to an integer.

Edit again, my original intention of this is to have the user input data in one form and send the data back to the main form. The main form will then do the desire actions. I've been having issues with that as well... but I need to address the data from the textboxes not being stored into my variables first.
 
Back
Top