Windows 7, MS Office 2007:
Recently the EXCEL Macros I've been using for years quit working. I defined the working Objects as Globals:
Global gobjEXCEL As Object
Global gobjEXCELWorkBook As Object
Global gobjEXCELWorksheet As Object
Then I use SET Statements to name the EXCEL Objects I want to use:
1) Set gobjEXCEL = CreateObject("Excel.Application")
2) Set gobjEXCELWorkBook = GetObject(pzExcelFileName)
3) Set gobjEXCELWorksheet = gobjEXCELWorkBook.Worksheets("Sheet1")
1 works, gobjEXCEL= Microsfoft Excel
2 fails, without setting ERR, subsequently 3 fails
This code has worked for a long time and only stopped working i n the last few days after a flurry of MS Updates.
Anybody know whats wrong with my Globals and/or Set Statements? I recently seemed to have a related problem ( Updates??? ) with VB6 and Access which got resolved with some Reference changes. But I haven't found a clue in the Object Browser and there aren't any Reference choices in EXCEL!
Recently the EXCEL Macros I've been using for years quit working. I defined the working Objects as Globals:
Global gobjEXCEL As Object
Global gobjEXCELWorkBook As Object
Global gobjEXCELWorksheet As Object
Then I use SET Statements to name the EXCEL Objects I want to use:
1) Set gobjEXCEL = CreateObject("Excel.Application")
2) Set gobjEXCELWorkBook = GetObject(pzExcelFileName)
3) Set gobjEXCELWorksheet = gobjEXCELWorkBook.Worksheets("Sheet1")
1 works, gobjEXCEL= Microsfoft Excel
2 fails, without setting ERR, subsequently 3 fails
This code has worked for a long time and only stopped working i n the last few days after a flurry of MS Updates.
Anybody know whats wrong with my Globals and/or Set Statements? I recently seemed to have a related problem ( Updates??? ) with VB6 and Access which got resolved with some Reference changes. But I haven't found a clue in the Object Browser and there aren't any Reference choices in EXCEL!