W
Wael_Bakr
I made an application in Vb.NET that loads an excel application and then
start to generate some reports on it, my problem is:
1 - the application was running with no problems and after formatting my PC,
installing Windows XP, SP2, Office 2003 + SP1, Visual studio 2003 and start
running the program it succeeded in making an excel application object, but
it faild to create a workbook or any other feature or property, except
"ExcelApp.Visible=True".
2 - when I start to debug the code, it gives me the following error " Old
format or Invalid Type Library"
3 - I checked my refrences and found that there is no problem, the
application compiles with no errors.
4 - I made my refrences by adding a refrence to excel.exe file into my
project and it adds automatically "Microsoft.Office.Core" refrence and
"VBIDE" refrence to my project.
I have tried to format my PC again and install office again and test, but it
still gives me the same error.
I have tested it on another PCs(3 different PCs) and it worked fine and
correctly with no problem
what does this error message mean?
What is its cause?
is there anything that I did not take care of after format?
what should I do in order to avoid this error message?
here is the code snippit that makes the problem:
Dim ExcelApp As Excel.Application
ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
Dim WB As Excel.Workbook
WB = ExcelApp.Workbooks.Add ' <==== Here Where it Crashs and give me
the error message " Old format or Invalid Type Library"
start to generate some reports on it, my problem is:
1 - the application was running with no problems and after formatting my PC,
installing Windows XP, SP2, Office 2003 + SP1, Visual studio 2003 and start
running the program it succeeded in making an excel application object, but
it faild to create a workbook or any other feature or property, except
"ExcelApp.Visible=True".
2 - when I start to debug the code, it gives me the following error " Old
format or Invalid Type Library"
3 - I checked my refrences and found that there is no problem, the
application compiles with no errors.
4 - I made my refrences by adding a refrence to excel.exe file into my
project and it adds automatically "Microsoft.Office.Core" refrence and
"VBIDE" refrence to my project.
I have tried to format my PC again and install office again and test, but it
still gives me the same error.
I have tested it on another PCs(3 different PCs) and it worked fine and
correctly with no problem
what does this error message mean?
What is its cause?
is there anything that I did not take care of after format?
what should I do in order to avoid this error message?
here is the code snippit that makes the problem:
Dim ExcelApp As Excel.Application
ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
Dim WB As Excel.Workbook
WB = ExcelApp.Workbooks.Add ' <==== Here Where it Crashs and give me
the error message " Old format or Invalid Type Library"