Oct 20, 2003 #1 W wondery Active member Joined Sep 12, 2003 Messages 43 i want lblSubTotal.Text-lblAdvance.Text but it not allow me .... i dont know y ?? please help
Oct 20, 2003 #2 M mutant Well-known member Joined Jan 19, 2003 Messages 1,771 Location Enfield, CT, USA User Rank *Expert* If you are trying to subtracts string then it wont work. Convert those to numbers first.
Oct 20, 2003 #3 PlausiblyDamp Administrator Joined Sep 4, 2002 Messages 6,155 Location Lancashire, UK User Rank *Expert* What error does it give? have you tried converting the label contents to a number first? Code: dim ans as double ans = double.Parse(lblSubTotal.Text) - double.Parse(lblAdvance.Text)
What error does it give? have you tried converting the label contents to a number first? Code: dim ans as double ans = double.Parse(lblSubTotal.Text) - double.Parse(lblAdvance.Text)
Oct 21, 2003 #5 V Volte Neutiquam Erro Joined Nov 17, 2002 Messages 2,165 User Rank *Expert* Are you making sure that ans is a Double or some other data type which supports decimals?