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,167 of 10,840   
   andrew to All   
   how can a math operator be set as a vari   
   25 Jan 05 01:12:32   
   
   XPost: comp.lang.basic.visual, comp.lang.basic.visual.misc, pl.comp.lang.vbasic   
   From: hdg33@hotmail.com   
      
   Public sValue1 As String, sValue2 As String   
   Public dValue1 As Double, dValue2 As Double   
   Public vOper   
      
   vOper = "*"                                                    'set operator   
   variable to "multiply"   
      
   sValue1 = txtMain1.Text                                 'get first string   
   value   
   sValue2 = txtMain2.Text                                 'get second string   
   value   
      
   dValue1 = CDbl(sValue1)                              'convert first string   
   value to double   
   dValue2 = CDbl(sValue2)                              'convert second string   
   value to double   
   dResult = (dValue1 & vOper & dValue2)   
   txtMain2.Text = CStr(dResult)   
      
   --- 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