![]() |
| ||
| errors in my file but not sure whats wrong file attatched 1 Attachment(s) hi all have spent a lot of time recently trying to get the attatched programe to run. decided to start from scratch,went through the tutorial for vb6 on main page of functionx , tried a few examples and all are ok,except where i had put in code incorrectly. but this example has got me beat, i get error 13 if i try to run programe. using debug it points me to a a line of code ,that as far as i can see is exactly the same as code in tutorial. i put the code in by pasting original code from tutorial to clipboard, and into vb project, but cannot quite find see whats incorrect with my project?? thank you |
| ||
| Re: errors in my file but not sure whats wrong file attatched The problem is that you have your textboxes initialized to strings, which cannot be converted into doubles, so VB complains. The quickest way to make VB ignore this is to add the line: On Error Resume Nextat the top of the sub. This tells VB to continue on to the next line when an error arises. It certainly is not the best way to handle errors, but until you decide exactly what you want to do, it will work. So, applying it to your program, it would look like this: Private Sub optaddition_Click() If you need more help on Error Handling, let me know, and I'll try to explain to you how it works. It's not hard. Hope this helps. |
| ||
| Re: errors in my file but not sure whats wrong file attatched thanks lalo in the tutorial it just gives info on the names of the controls such as name frm operations/caption is operations name optaddition/caption addition there are three boxes on the left hand side of form shown in the tutorial labeled or marked as below first number, second number,result with names txtnumber1 txtnumber2 txtresult, i assumed i needed to add three textboxes , or should i have used a differant control rather than a textbox ???? the code is provided in the tutorial , so know there is an error in the way i have created my form, i can see what you mean (text is text and not a number) what i am unsure of is what i change in my layout/controls of my form for the code to work as it was written. thank you for your help i need to do a bit more reading practise on vb |
| All times are GMT -4. The time now is 3:25 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC