View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default a string to an integer

Also String is an intrinsic function in VB!

Use Option Explicit at the top of your module and make sure you dim all of
your variables using names that are not intrinsic functions.



"Philosophaie" wrote:

I have a string:

string(3) = "543"

I try to change it to an integer:

int = cint(string(3))

It gives me a 'Type Mismatch' Error.

Maybe there may be spaces before of after the numbers but does that matter?

How do I change from a string to an integer?