Excel VBA Run-Time13 error

Pianoman23

New Member
Joined
May 16, 2014
Messages
25
Can anyone help with this error. The code I'm using is as follows:

Private Sub CommandButton1_Click()
DrugUserForm.Show
End Sub


Sometimes it works; sometimes it produces a Run-tine '13' error. Type mismatch.

It's driving me mad!!!

Any thoughts?
 
If a cell contains "" it's not blank and "" is greater than zero. Does this test work for you?

Code:
If IsNumeric(Sheet6.Cells(r, "AA").Value)

I've changed the code to
If IsNumeric(Sheet6.Cells(r, "AA").Value) >0 then...........

AND IT WORKS!!!!

Thank you so much for all your help.
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,216,782
Messages
6,132,676
Members
449,747
Latest member
OldMrsMol

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