home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,491 of 10,840   
   Jon Smyth to Erwin Bormans   
   Re: Convert text to double   
   14 May 05 08:54:39   
   
   From: jon@smyth.com   
      
   The best way would be to handle the error in the code.  Use the 'On Local   
   Error' trap to handle it within the subroutine.  If you get the conversion   
   error you can do whatever makes sense to your application.   
      
   "Erwin Bormans"  wrote in message   
   news:427735c9$0$12978$ba620e4c@news.skynet.be...   
   > Hello   
   >   
   > I want to convert a value in a text propertie to a double.   
   >   
   > I can use CDbl(grid1.text) for this, but the problem is that some text   
   > properties are empty and when they are the code give errors.   
   >   
   > Is there a way to convert text to double, but if the text is empty he just   
   > returns zero?   
   >   
   > Kind Regards   
   > Erwin   
   >   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca