Run-time error

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,280
Office Version
  1. 2013
Platform
  1. Windows
Code:
TextBox11 = TextBox9.Value - TextBox10.Value

Hello,
If there is no data at one of the textboxes I'm having an error as Run-time error '13': Type mismatch
What is the solution to fix that problem?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Thank you,
If I add together below code it does not showing the deciminal values correctly.
What is the solution for it?
Code:
TextBox11.Text = Format(TextBox11.Text, "###,##0.00")
 
Upvote 0
Thank you,
If I add together below code it does not showing the deciminal values correctly.
What is the solution for it?
Code:
TextBox11.Text = Format(TextBox11.Text, "###,##0.00")

It works for me.
In what way is it not working?
Do you mean that if the text box is blank, you want it to show 0.00 ? If so :

TextBox11.Text = Format(Val(TextBox11.Text), "###,##0.00")

Or perhaps you are looking for :

TextBox11 = Format(Val(TextBox9) - Val(TextBox10), "###,##0.00")
 
Upvote 0

Forum statistics

Threads
1,214,790
Messages
6,121,607
Members
449,037
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top