ASLAM O ALIKUM
Agar visual basic 6 main text box empty hoo aur hum nay us text box ko command button per programme kia hoa ho to us main RUN TIME ERROR 13 Miss match ajata hai plz koi btay kay isay kesy door karoon
ASLAM O ALIKUM
Agar visual basic 6 main text box empty hoo aur hum nay us text box ko command button per programme kia hoa ho to us main RUN TIME ERROR 13 Miss match ajata hai plz koi btay kay isay kesy door karoon
Kuch detail bataya karain, ke aap [Text] control se kya kaam lay rahay hain?
Mismatch ka error us waqt aata he, jab 2 data types match na hon.
Basically [Text] control ki value string type hoti hay, for example aap:
ko aap ic tarhan likhain ge:Code:result=5 + Text1.text
Agar aap ka mas'ala ye nahi tha, to thori tafseel bata dain, ke aap kya karna chahtay hain.Code:result=5+CDbl(Text1.text)
(CDbl=Function converts String numbers into Double Datatype.)
Bhai MAin us main gold price converter bna raha hn
yeh code hain
Private Sub Command1_Click()
Text3.Text = Text1.Text / 11.664 * Text2.Text
Command2_Click()
Text4.Text = Text3.Text - Text1.Text / 11.664 * Text5.Text
Ok,
Kionke Text wali values String he aor "11.664" number he islye data mismatch ho rahi hay.
Solution:
Aap TextBox ki values per arithmetic operation kernay se pahlay usay Double data types mein convert kerlain. for example "Convert Double" function jiska alias he "CDbl".
Aap apnay code ko ic code se replace kerlain:
Command2_Click perCode:Private Sub Command1_Click() Text3.Text = cdbl(Text1.Text) / 11.664 * cdbl(Text2.Text)
Code:Command2_Click() Text4.Text = cdbl(Text3.Text) - cdbl(Text1.Text / 11.664) * cdbl(Text5.Text)
bhai yeh main nay replace kar dia hai per jub koi bhi textbox khali ho to miss match ka error a jata hai
aap Command button ke andar ye likhain,
Application ko error free karnay ke lye aor bhi error handling karni parti he, aap apni project files yahan upload ker dain phir usay theek kya jasakta hay.Code:If Text1.text="" then msgbox "Text1 is empty" endif
project files upload kar dain
Bookmarks