Monday, February 2, 2009

How to add two dollar amounts

'''''' To add the $ amounts''''''''''''''''

amount1 = inputbox("Enter the first dollar amount")
''''''Enter the amount with $ symbol Ex - $ 2000

amount2 = inputbox("Enter the second dollar amount")
'''''Enter the amount with $ symbol Ex - $ 3000

lnt1=len (amount1)
'To get the length of the dollar amount
lnt2=len(amount2)
' To get the length of the dollar amount

aamount1 = Right(amount1,lnt1-1)
'''''' To remove the dollar symbol and get the actual amount

aamount2= Right(amount2,lnt2 - 1)
''''''To remove the dollar symbol and get the actual amount

msgbox Cint(aamount1)+Cint(aamount2)

About Me

My photo
Hi all,I am Arun Singh Rajaputra. I am working as a Project Lead in a reputed organization in Hyderabad, AP, India. I have little bit knowledge on Quick Test Professional and like to share my knowledge to all through this blog.

Subscribe to get updates on this blog

Enter your email address:

NOTE

Some of the posts posted in this blog are collected and most of them have been prepared by me. If any one have objections regarding any copied posts. Please mail me so that I can take a necessary action on that post.