![]() |
Unable to loop on Excel collections. Error 451.
Hi,
I encountered a strange issue on one of my customers's laptop. My app (vb6) is working with Excel and is crashing on lines of code like : For each objSheet in MyWorkbook.Sheets I tried 2 cases, when objSheet is defined as object or as worksheet, it generates the error "Runtime error '451': Property let procedure not defined and property get procedure did not return an object". I guess the sheets object is not considered as a collection and I'm wondering why because my app is just working fine for any other user. Some library corruption? Thanks, Olivier |
Unable to loop on Excel collections. Error 451.
Sheets is a collection for sure but it includes all types of sheets (Chart
sheets, dialog sheets,..). It may not help but if you want to get just worksheets you should user the Worksheets collection. -- Jim "oliviers" wrote in message ... | Hi, | | I encountered a strange issue on one of my customers's laptop. | My app (vb6) is working with Excel and is crashing on lines of code | like : | | For each objSheet in MyWorkbook.Sheets | | I tried 2 cases, when objSheet is defined as object or as worksheet, | it generates the error "Runtime error '451': | Property let procedure not defined and property get procedure did not | return an object". | | I guess the sheets object is not considered as a collection and I'm | wondering why because my app is just working fine for any other user. | Some library corruption? | | Thanks, | | Olivier |
Unable to loop on Excel collections. Error 451.
On 24 jan, 15:50, "Jim Rech" wrote:
Sheets is a collection for sure but it includes all types of sheets (Chart sheets, dialog sheets,..). It may not help but if you want to get just worksheets you should user the Worksheets collection. -- Jim"oliviers" wrote in message ... | Hi, | | I encountered a strange issue on one of my customers's laptop. | My app (vb6) is working with Excel and is crashing on lines of code | like : | | For each objSheet in MyWorkbook.Sheets | | I tried 2 cases, when objSheet is defined as object or as worksheet, | it generates the error "Runtime error '451': | Property let procedure not defined and property get procedure did not | return an object". | | I guess the sheets object is not considered as a collection and I'm | wondering why because my app is just working fine for any other user. | Some library corruption? | | Thanks, | | Olivier I will give it a try and let you know. Thanks for the suggestion. Olivier |
All times are GMT +1. The time now is 05:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com