Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

cannot compare textbox text against label caption

$
0
0
Hi,

I'm new to VB and using VB 6 for the moment. In my program I wrote below code to test txtReferans.Text against lblReferansX.Caption but this simply does not work. For example even when txtReferans.Text equals to lblReferans4.Caption relevant case is not executed.


Select Case txtReferans.Text
Case lblReferans4.Caption
lblLot4.Caption = txtLot.Text
Case lblReferans5.Caption
lblLot5.Caption = txtLot.Text
End Select

If I write "Ref4" instead of lblReferans4.Caption, run the program and enter "Ref4" into txtReferans.Text it works fine so I know the code logic is correct.

Can anyone tell me how can I fix my issue?

Thanx a lot.

Balkir

Viewing all articles
Browse latest Browse all 21243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>