VB Error 2036

JDL

Board Regular
Joined
Mar 23, 2009
Messages
68
Hi
Can someone explain to me what error 2036 means in the vb coding.
I am having trouble running a bit of code.......

If MarginalQALY > 5 Then
Sheets("PSA Output").Range("v_PSAStart").Offset(PSACount, 2) = marginalQALY
End If


When it gets to the If MarginalQALY > 5 then line i get System 13, type mismatch.

When i go into the vb side and look at what is happening, some of my variables are showing error2036 when i put my cursor over them, what does this mean? is this part of my system 13 error?

Thanks to anyone who can help.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
FORGET THIS ONE!!
It would appear that i was being a bit of a plick ;)
It was picking up formula rather than numbers, i found that if the cell referred to as MarginalQALY had formulas in then it set that variable to Error 2036. The error occured trying to see if Error 2036 was greater than 5, of course it struggled. When i removed the formula with a number it took that number and worked fine.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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