On Fri, 27 Jul 2012, rocko wrote: > Using '.value instead of .text gives an error: > "Unknown symbol "value" in class TextBox" > > On Fri, 2012-07-27 at 02:05 +0200, LeszekK wrote: > > 'Do not use textboxes for mathematical calculations > > > > Dim prmAmnt As Integer > > Dim totAmnt As Integer > > Dim perAmnt As Single > > > > prmAmnt = prmBox.value 'valuebox! not textbox > > totAmnt = totBox.value 'valuebox! not textbox > > perAmnt = Round((prmAmnt / totAmnt * 100), 2) > > ValueBox1.Value = perAmnt & "%" > > > > I not tested the code but it should work. > >
First, I herewith want to join the folks who urge to not top-post. If you have a deeper look at the error message above, you'll notice that you still use TextBox instead of ValueBox, right? Regards, Tobi ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user