Search code examples
vb6

VB6 while formatting Currency in the TextBox , in place of '$' , it is displaying '?'


I have a textbox in which I want to display amount with $ symbol. I have written the formatting line. But instead of $ it is displaying ?

     .txtField(priceAmt).Text = Format$(0, "currency")

If I have amount 55.00, it is getting displayed as ? 55.00. I want it to be displayed as $55.00.

This is happening in only my machine. When other person took the same code, it is giving expected result.


Solution

  • Two solutions : 1.As comment suggested by @Brian M Stafford, I changed line to Format$(0, "$0.00"). This worked for me. 2.In control panel settings, Currency was set to rupees symbol. I changed it into $ then it worked for me.

    Image of Currency Setting tab