Quantcast
Viewing all articles
Browse latest Browse all 1908

Error while downloading an excel 2003 file from IE in MS office 2010 installed machine

The below code block is written in VBA of an excel 2003 (.xls). When I try to open the excel file which has the below VBA code from IE browser in Office 2010 installed machine, a window with Open, Save and Cancel Appears, Clikcing on Open directly,

1. Message box appears

2. Clicking on OK, again the message box appears

4. Clicking on OK, "Save as" window gets prompted with some 8 digit alphanumeric file name.

5. Clicking on Cancel, an error appears like 'Microsoft Excel has encountered a problem and needs to close' and when i close it shows a warning 'The file you are tyring to open in in different extension. Do you want to open it anyhow.' Clicking on Yes, opens the file in compatibility mode.

Public Sub Workbook_Open()

MsgBox "Test"

ThisWorkbook.Save

End Sub

Works well when i save it in local and open it

When i save the file not opening directly from IE and open it, no errors or warnings occur. It opens fine.

Works well in Office 2003 machine

Opening the same file in 2003 machine directly from IE works well without any issues.


Viewing all articles
Browse latest Browse all 1908

Trending Articles