Option strict disallows late binding in invoke code

Hello, I am trying to learn how to use the invoke code , here is a screenshot of my invoke code and its arguments. The error i get is “option strict disallows late binding at line 7”.
I can see what i am doing wrong, please some one help

@MasterOfLogic Can you check if this code Works :
The error that you get is Mostly Because the GetSheets method doesn’t actually output an array of String, infact I don’t think there’s a GetSheets method on the Excel.Workbook class instead I think it’s called Sheets.

The WorkBook.Sheets() method outputs a Collection of WorkSheets present not the names, we need to loop each of the Worksheet and extract the name and then compare. Take a look at this code.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.