/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
Cast from string "" to type 'Double' is no~
Fra : Tor-Arne Jensen


Dato : 02-09-02 12:13

I've made a prog (my first) which has some textboxes/combos that is used in
the calculations.
The program works fine if i fill out everything, but if i forget to fill out
f.ex one textbox, then i get this message:

Cast from string "" to type 'Double' is not valid

Any1 that could tell me what to do?





 
 
preben nielsen (02-09-2002)
Kommentar
Fra : preben nielsen


Dato : 02-09-02 18:48


"Tor-Arne Jensen" <torarneg@stud.ntnu.no> skrev i en meddelelse
news:lJHc9.13106$0p1.220054@news2.ulv.nextra.no...
> I've made a prog (my first) which has some textboxes/combos that
is used in
> the calculations.
> The program works fine if i fill out everything, but if i forget
to fill out
> f.ex one textbox, then i get this message:
>
> Cast from string "" to type 'Double' is not valid

Vis dog koden !


--
/\ preben nielsen
\/\ prel@post.tele.dk



Jay Jay (04-09-2002)
Kommentar
Fra : Jay Jay


Dato : 04-09-02 20:15

Du kunne jo f.eks. lave noget exception handling... Jeg ved ikke om du
programmerer i vb6 eller vb.net, men i vb.net ville jeg nok gøre sådan her:

private sub calc()
Try
udregninger
catch ice as invalidCastException
messagebox.show("You must fill out all the fields", "Warning!")
End try
end sub

Prøv det....
"preben nielsen" <prel@post.tele.dk> skrev i en meddelelse
news:3d73a464$0$145$edfadb0f@dspool01.news.tele.dk...
>
> "Tor-Arne Jensen" <torarneg@stud.ntnu.no> skrev i en meddelelse
> news:lJHc9.13106$0p1.220054@news2.ulv.nextra.no...
> > I've made a prog (my first) which has some textboxes/combos that
> is used in
> > the calculations.
> > The program works fine if i fill out everything, but if i forget
> to fill out
> > f.ex one textbox, then i get this message:
> >
> > Cast from string "" to type 'Double' is not valid
>
> Vis dog koden !
>
>
> --
> /\ preben nielsen
> \/\ prel@post.tele.dk
>
>



Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408926
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste