From a VB.NET application I start a macro in an Excel file (Windows XP, Excel 2003).
This works without a problem.
The file is stored on a network share.
When I open, save and close this Excel file from a (my) Windows 7 (64 bit) computer using the same version of Excel, the VB.NET app doesn't work any more on the XP computer. I get the error macro 'genereer' cannot be found. When starting the same app from the Windows 7 (64 bit) computer it does work.
When I manually open, save close the same Excel file using Excel on a 32 bit Windows computer it again does work. Macro security settings are already low on the computer running the app.
Windows 7 compatibility mode also doesn’t solve it; I tried XP SP3 mode and W2000 mode.
Possible solutions would be to install a virtual (32 bit) XP on my computer or upgrade the old XP computer to some 64 bit Windows version however for now I’m still looking if there is a better solution.
Code:
Dim excAppl As Microsoft.Office.Interop.Excel.Application = Nothing
Dim excWrkb As Microsoft.Office.Interop.Excel.Workbooks = Nothing
excAppl = New Microsoft.Office.Interop.Excel.Application
excWrkb = excAppl.Workbooks
excWrkb.Open(fileName, True, True)
excAppl.Run("Genereer", parm1, parm2, parm3)
This works without a problem.
The file is stored on a network share.
When I open, save and close this Excel file from a (my) Windows 7 (64 bit) computer using the same version of Excel, the VB.NET app doesn't work any more on the XP computer. I get the error macro 'genereer' cannot be found. When starting the same app from the Windows 7 (64 bit) computer it does work.
When I manually open, save close the same Excel file using Excel on a 32 bit Windows computer it again does work. Macro security settings are already low on the computer running the app.
Windows 7 compatibility mode also doesn’t solve it; I tried XP SP3 mode and W2000 mode.
Possible solutions would be to install a virtual (32 bit) XP on my computer or upgrade the old XP computer to some 64 bit Windows version however for now I’m still looking if there is a better solution.