variable and textbox

want to change the asci 104 to asci 222 which is in viable 3

Page 1 of 1

6 Replies - 1446 Views - Last Post: 31 December 2009 - 06:16 AM Rate Topic: -----

#1 bordino   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 06-July 09

variable and textbox

Posted 30 December 2009 - 04:30 PM

I have 3 variable and textbox
Variables contain the 3 asci character each
Dim variable 1
Dim variable 2
Dim variable 3

variable 1

Chr 97
Chr 110
Chr 104

Variable2

Chr 66
Chr 112
Chr 180

Variable3

Chr 222
Chr 333
Chr 343

What I want to do is In my textbox asci 112 is there already so when a user types asci 104
on left said of asci 112 I want to check right said see what asci is there and check the 3 variable we have
see if the asci 112 contain in those variable if yes I want to change the asci 104 to asci 222 which is in viable 3

This post has been edited by bordino: 30 December 2009 - 04:33 PM


Is This A Good Question/Topic? 0
  • +

Replies To: variable and textbox

#2 AdamSpeight2008   User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: variable and textbox

Posted 30 December 2009 - 05:04 PM

To me that made no sense, so could please explain in clearer terms.
Was This Post Helpful? 0
  • +
  • -

#3 bordino   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 06-July 09

Re: variable and textbox

Posted 30 December 2009 - 05:23 PM

View PostAdamSpeight2008, on 30 Dec, 2009 - 04:04 PM, said:

To me that made no sense, so could please explain in clearer terms.



Private Sub Text1_Change()
Dim intChars1 (3) As Integer
Dim intChars2 (3) As Integer
Dim intChars3 (3) As Integer
Dim x As Integer

intChars1 (0) = "97"
intChars1 (1) = "110"
intChars1 (2) = "104"

intChars2 (0) = "66"
intChars2 (1) = "112"
intChars2 (2) = "180"

intChars3 (0) = "222"
intChars3 (1) = "333"
intChars3 (2) = "343"


we have 3 vairable ok we have a textbox value is asci 112 so i want to type asci 104 on the left said of asci 112
ok

as soonest i pressed asci 104 i want to check see witch variable is asci 112 belong to we know its in intChars2 if asci 112 is true in intChars2 then i want to change asci 104 to asci 222 witch is in intChars3

all i want to do is check if asci 112 is in variable above if yes change asci 104 to 222

This post has been edited by bordino: 30 December 2009 - 05:29 PM

Was This Post Helpful? 0
  • +
  • -

#4 chili5   User is offline

  • D.I.C Lover

Reputation: 20
  • View blog
  • Posts: 1,146
  • Joined: 28-December 07

Re: variable and textbox

Posted 30 December 2009 - 06:45 PM

That still doesn't really make very much sense. Check your grammar and try to make it clearer.

First thing it is ASCII not asci.

Please explain better.
Was This Post Helpful? 0
  • +
  • -

#5 bordino   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 06-July 09

Re: variable and textbox

Posted 30 December 2009 - 06:54 PM

View Postchili5, on 30 Dec, 2009 - 05:45 PM, said:

That still doesn't really make very much sense. Check your grammar and try to make it clearer.

First thing it is ASCII not asci.

Please explain better.

i never thought you'd be a .........
I don’t speck good English you see but I solved my problem is that all you can do instead of helping what is the problem you go on just criticizing people man I think you don’t have the solution for what I’m asking in my first post if you keep doing this people run away from this forum

This post has been edited by bordino: 30 December 2009 - 07:35 PM

Was This Post Helpful? 0
  • +
  • -

#6 vb5prgrmr   User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: variable and textbox

Posted 30 December 2009 - 11:48 PM

Okay, your variables, even though you have prepended them with int, they are holding strings and why you don't get a type mismatched error because you have declared them as integer I don't know why...

So, to fix this remove the quotes (") from around your values and everything should be fine.

Now, you want to be able to tell if someone has entered an "h" into a text box or you want to know if they have entered "104" into a text box?

I ask this because some of your values are well beyond 256, which is the upper limit of ASCII...



Good Luck
Was This Post Helpful? 0
  • +
  • -

#7 chili5   User is offline

  • D.I.C Lover

Reputation: 20
  • View blog
  • Posts: 1,146
  • Joined: 28-December 07

Re: variable and textbox

Posted 31 December 2009 - 06:16 AM

Quote

So, to fix this remove the quotes (") from around your values and everything should be fine.


This actually isn't a problem. You can use integers in strings as long as they can be converted to an integer properly. Although you should still fix this.

To check what the user has entered in the text field do this:

If Text1.Text = "104" Then

Else If Text1.Text = "105" Then

Else If Text1.Text = "h" Then

Else

End If


This post has been edited by chili5: 31 December 2009 - 06:17 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1