Sheet(CaseName).Delete Error 13 type mismatch

M

M Skabialka

From Access:
CaseName = "Dallas"
xlApp.Run "ExtractData", CaseName

In Excel:
ExtractData(CaseName)

This gives me an error 13 - type mismatch:
Sheet(CaseName).Delete

But this doesn't:
Sheets("Dallas").Delete

I think
Sheet(CaseName) is looking for a number not a string. How do I convince it
otherwise?

Thanks,
Mich
 

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

Top