简单的价值比较问题 [英] Easy Value Compare Question

查看:71
本文介绍了简单的价值比较问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何比较两个值的建议,如果任一值发生变化,

则两个值现在都变为更改的值。现在我正在用文本框和onchange事件来实现这个

,但想摆脱

文本框并使用内部变量。


TIA

Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I''m doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.

TIA

推荐答案

Dim A,B as String


A = textbox1.text

B = textbox2.text


如果不是A = B那么A = B


Y2K < y2 ****** @ gmail.com在留言中写道

news:11 ********************** @ m79g2000cwm .googlegr oups.com ...
Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...

任何比较两个值的建议,如果任何一个值发生变化,

那么这两个值现在变成了改变的价值观。现在我正在用文本框和onchange事件来实现这个

,但想摆脱

文本框并使用内部变量。


TIA
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I''m doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.

TIA



Scott,


感谢您的回复,但这不会起作用,因为只有比较A和B并使A等于B,这只是




我需要比较两者,并使每个值与最后的

更改值相同。

Scott M.写道:
Scott,

Thanks for the reply, but that''s not going to work, as it''s only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.
Scott M. wrote:

Dim A,B as String


A = textbox1.text

B = textbox2.text


如果不是A = B那么A = B

" Y2K" < y2 ****** @ gmail.com在留言中写道

news:11 ********************** @ m79g2000cwm .googlegr oups.com ...
Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...

任何比较两个值的建议,如果任何一个值发生变化,

那么这两个值现在变成了改变的价值观。现在我正在用文本框和onchange事件来实现这个

,但想摆脱

文本框并使用内部变量。


TIA
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I''m doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.

TIA


您需要保留第三个值:

A = B = C


然后当你需要检查时....

如果A< C则

C = A

B = A

否则B< C然后

C = B

A = B < br $>
endif


-

特里

" Y2K"写道:
You need to keep a third value:
A=B=C

and then when you need to do your check ....
If A <C then
C = A
B = A
elseif B <C then
C = B
A = B
endif

--
Terry
"Y2K" wrote:

Scott,


感谢您的回复,但这不会起作用,因为它'只有

比较A到B并使A等于B.


我需要比较两者,并使每个值与最后一个相同

改变了价值。


Scott M.写道:
Scott,

Thanks for the reply, but that''s not going to work, as it''s only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.
Scott M. wrote:

Dim A,B as String


A = textbox1.text

B = textbox2.text


如果不是A = B那么A = B


" Y2K" < y2 ****** @ gmail.com在留言中写道

news:11 ********************** @ m79g2000cwm .googlegr oups.com ...
Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...

任何比较两个值的建议,如果任何一个值发生变化,

那么这两个值现在变成了改变的价值观。现在我正在用文本框和onchange事件做
,但想摆脱

文本框并使用内部变量。

>

TIA

>
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I''m doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.
>
TIA
>



这篇关于简单的价值比较问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆