mod error in VBA

  • Thread starter Thread starter geebee
  • Start date Start date
G

geebee

hi,

i have the following:

R = Evaluate("mod(x,2)")

but i am getting a type mismatch error.

im not sure how to fix this..

thanks in advance,
geebee
 
What is x? Assuming it is a variable then you can not just have it in the
string. Try this...

R = Evaluate("mod(" & x & ",2)")
 
VBA has its own Mod function, too.


hi,

i have the following:

R = Evaluate("mod(x,2)")

but i am getting a type mismatch error.

im not sure how to fix this..

thanks in advance,
geebee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Mod and Int gives me a Runtime Error 13 -- Type mismatch. 1
type mismatch 3
conditional formatting 1
2007 Even/Odd/MOD 4
check 3
unprotected cells 2
formula to VBA 11
VBA Mod, Excel Floor, etc. 8

Back
Top