chart creation - type mismatch

Hi,

I'm adding a chart to a sheet in excel. That part is okay, but following that code, any occurence of a code such as xlSht.rows("5:45") or xlSht.cells("H4") gives me a "Type mismatch" error. If I comment out the code for creating the chart and then run it again, I get no error, so I know that my syntax etc. is correct. I have a feeling that this might be because when the chart is created it gets selected, or gets the focus, and then the code is unable to return to the sheet "surface", but I even tried using the deselect method for the chart at the end of its creation. Even then, I get a type mismatch error for any kind of reference to a range object.

Please help!

Thank you,
Kriti



Answer this question

chart creation - type mismatch

  • chart creation - type mismatch