1,509 questions
Given just VB and runtime error 13 it looks like a type issue but it isn't clear. Could you provide some more information as it is really hard to just look at your code and figure things out?
- What line is generating the runtime error?
- This looks like an Excel spreadsheet code, are you calling this from within an Excel macro or via an app that is talking to Excel using interop?
- Can you provide a sample set of data in your spreadsheet including the column information so we can try to replicate the issue?
Just on a guess I'm going to assume the range you're passing to this code is bad. Especially around that Scenario
column. But this is a total guess at this point.