This works:This results in "Run-time error '13'", 'Type mismatch':Please Login or Register to view this content.
Why is that?Please Login or Register to view this content.
This works:This results in "Run-time error '13'", 'Type mismatch':Please Login or Register to view this content.
Why is that?Please Login or Register to view this content.
Last edited by Woulter; 12-15-2018 at 04:36 PM.
Hello Woulter,
You can make this work by dimming your object variable as a generic object...
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Yes, I'm just wondering why 'Sheets' and 'Worksheets' can't both be declared as 'Excel.Sheets'/'Excel.Worksheets'.
Hello Woulter,
I am guessing here. The "Sheets"collection holds Charts, Worksheets, and Macro sheets. The Worksheets collection holds only the worksheets of the Active Workbook. It could be that assigning an object as "Ëxcel.Worksheets"creates a conflict in the application since the object already exists.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks