PDA

View Full Version : Need Help in VB


rochel1977
04-27-2008, 10:18 PM
Guys. I need a small help in VB. I need to convert Celcius in to Ferhanhite like the GUI below. I made the code even. but there is something wrong. Pls help

this is the code i typed

Private Sub Command1_Click()
txtInput.Text = ""
Sum = (txtInput.Text - 32) * 5 / 9

lblOutput.Caption = "Celcius Equivalent" & Sum


End Sub

the GUI is like this and when i input the data the out put should come like in the second picture.

http://img504.imageshack.us/img504/8606/new1yi9.jpg

gayannr
04-27-2008, 10:27 PM
Convert(cast) your Text box's text into Integer
and remove this - txtInput.Text = ""