Thanks:  0
Likes:  0
Dislikes:  0

# Thread: how to concantinate the values ??

1. ## how to concantinate the values ??

charges=100
totalcharges=\$100
I have written this lines to conactenate the charges with "\$" value,but its not working...

If ("\$" &amp; intCharges=intTotalcharge) Then
msgbox "charges are equal"
End If

can you plz help me out

2. ## Re: how to concantinate the values ??

Pl. perform data type conversion before comparing.

[ QUOTE ]

intCharges=100
intTotalcharges="\$100"

If ("\$" &amp;CStr(intCharges)=intTotalcharges) Then
msgbox "charges are equal"
End If

[/ QUOTE ]

3. ## Re: how to concantinate the values ??

hi Anand,
Thkz for ur reply.By executing this it is showing,
intcharges=100
intTotalcharges=nothing(means IntTotalcharges
After :,it is not showing anything.Can u plz help me?

5. ## Re: how to concantinate the values ??

msgbox "Charges:"&amp;intCharges
msgbox "Totalcharge:"&amp;intTotalcharge

If ("\$" &amp;CStr(intCharges)=intTotalcharges) Then
msgbox "charges are equal"
else
msgbox "charges are not equal"
End If

Even after writing this,its chowing
charges=100
totalcharges=\$100
msgbox "not equal"

6. ## Re: how to concantinate the values ??

Ram,

charges=100
totalcharges=\$100

("\$" &amp;CStr(intCharges)=intTotalcharges)

In the if you have intCharges &amp; intTotalcharges.

7. ## Re: how to concantinate the values ??

yeah,I have given intCharges and intTotalcharges.
Even i have tried with this also.
if strcmp(“\$” &amp; intCharges,intTotalCharges)=0 then
msgbox "charges are equal"
still it is showing type mismatch and intCharges=100 and intTotalcharges=\$100.

8. ## Re: how to concantinate the values ??

yeah,I have given intCharges and intTotalcharges.
Even i have tried with this also.
if strcomp(“\$” &amp; intCharges,intTotalCharges)=0 then
msgbox "charges are equal"
still it is showing intCharges=100 and intTotalcharges=\$100.

9. ## Re: how to concantinate the values ??

[ QUOTE ]

msgbox "Totalcharge:"&amp;intTotalcharge

If ("\$" &amp;CStr(intCharges)=intTotalcharges) Then

[/ QUOTE ]

Is there a typo for "inttotalcharge" in msgbox but in if "inttotalcharges"?

10. ## Re: how to concantinate the values ??

msgbox "Charges:"&amp;intCharges
msgbox "Totalcharge:"&amp;intTotalcharge

'If ("\$" &amp;CStr(intCharges)=intTotalcharge) Then

If strcomp("\$" &amp; intCharges,intTotalcharge)=0 Then
msgbox "charges are equal"
else
msgbox "charges are not equal"
End If

check it once plzzzzzzzzzzzzz.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.