sorry no well wrote code snippet , but my problem is although an absolute novice with VB6, I have created , well a specialist calculating programme, it is only a glorified calculator but using a lot of trigonometry functions, on the PC I created it on it works 100%. The PC running on Windows XP (English) but as soon as I alter the regional and keyboard settings the programme falls down and not all equations are completed, I will enclose a sippet of code I thought that perhaps the Listbox was failing but another list box operates well, I have searched the web and found a utility named MULTILINGUAL VB but my VB6 does not accept tis programme, is there a way or means to alter the code to accept another language apart from english to the programme, please be very patient with me with your reply I am not at all computer litterate but enjoy new ventures and challenges. oops I would like the prog. to run on PC with Portuguese/brazilian default

Thanking you in anticipitation

Vince (RENTADENT)

Private Sub Command2_Click()
Label68 = Val(Text5.Text)
Label32 = Val(Text8.Text)
Label48 = 3.141 / 360 * Val(Label15.Caption) * Val(Label37.Caption)
Label45 = Val(Label14.Caption) / Val(Label22.Caption)
Label46 = Atn(Label45.Caption)
Label47 = Val(Label46.Caption) * 180 / 3.14
Label39 = Round(Label47.Caption, 2)
Label32 = Val(Text7.Text)
Label10 = Val(Text8.Text)
Label53 = Val(Label10.Caption) * Val(Label46.Caption)
Label40 = Round(Label53.Caption, 3) + Val(Text7.Text)
Label54 = Val(Label40.Caption)
Label49 = Round(Label48.Caption, 3)
Label50 = Val(Label49.Caption)
Label57 = Val(Text5.Text)
Label64 = List2.ItemData(List2.ListIndex)
Label62 = Val(Label50.Caption) / Val(Label64.Caption)
Label59 = Val(Text5.Text)
Label73 = List2.Text
Label67 = Val(Label50.Caption) - Val(Label100.Caption)
Label74 = Val(Label67.Caption) / Val(Label116.Caption)
Label152 = Round(Label74.Caption, 3)
Label100 = Val(Text5.Text) * 2
Label158 = (Label39.Caption) / 57.29578
Label160 = Cos(Label158)

Hey,

Rather then using Val()

u can use CDbl() ot CInt(), which are working on local(regional) settings unlike Val().

Enjoy :)

Hello to both Ravisuthar and Amrindersingh, thanks for taking time to reply I have tried Ravisuthar advice it seem to work OK, thanks a million to both of you! both 100% diamonds,
cheers

WOWWWW, I spoke too soon, I now have only one problem all works ok but except one equation, in English settings the answer is correct, in Brasil/Portuguese it returns an incorrect answer, any ideas please
Label31 = CInt(Text3.Text) / 2
Label37 = Val(Text3.Text) - Val(Text4.Text)
Label176 = Val(Label37.Caption) / 2
Label48 = 3.141 / 360 * CDbl(Label15.Caption) * CDbl(Label37.Caption)
Label49 = Round(Label48.Caption, 3)
Label50 = CDbl(Label49.Caption)

if any help Label49 is returning the Tan of an angle in this case 26.1 degrees

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.