i tried to delete or to clear the textbox but i got an error "Conversion from string "" to type 'Double' is not valid"

here's my code
textbox1.Text = Format(Val(textbox1.Text), "###,###.00")


anybody can help me please? thanks...

Recommended Answers

All 5 Replies

what is the textbox.text? any this is there in textbox when this piece of code runs?

I you are trying to clear textbox then try using

textbox1.text = nothing

textbox1.text=string.emty

Use this textbox1.text = ""

textBox1.Text= String.Empty
TextBox1.Text= ""

Both alright bt better u use this

textbox1.text=String.Empty
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.