Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Type Mismatch Error

  Asked By: Reginheraht    Date: Oct 31    Category: MS Office    Views: 627
  

I tried to Dim j as String and a Range. the 10 is supposed to be column J
and 22 is Column V



The error says Type Mismatch and Highlights the j you see below after the
"For"



For j = oMarketSheet.Columns("10") To oMarketSheet.Columns("22") Step 2


Set oMarketSheet = oWorkbook.Worksheets(sMarketSheet)

Any ideas, if you need to see more code, I can.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Raquel Austin     Answered On: Oct 31

Try setting it to a Variant data type. (I suspect that it really needs
to be an array, though) Then see what is actually stored in the
variable and adjust your declaration statement accordingly. If that
does not work, please post more of your code  so we can better follow
what might be passed to the variable and what could be conflicting.

 
Didn't find what you were looking for? Find more on Type Mismatch Error Or get search suggestion and latest updates.




Tagged: