Q
Qt NCogNeeto
Had some problems with a computer so I had to completely reinstall Windows XP and subsequently Microsoft Office 2003. I have an Excel document that had no changes between the time I reinstalled Windows XP and Excel and openedup the Excel document to test the new Office install.
In this Excel document is a button with a macro assigned to it (which, again, has not changed for months). I click on this button and get the error, 'Runtime error 1004. Application defined or object defined error.' I have posted the macro code below (code that charts a range of cells populated witha web query - simple stuff) that the VBA debugger chokes on and have notated the specific line as well. It can't be anything with the VBA code or theworksheet because I can take the same Excel document to another computer with Office 2003 installed and it works fine. I'm thinking it has to be a missing Excel/VBA component in the new install - which also baffles me because when I reinstall Office, I do a complete install - getting everything.
Here's the macro code VBA debugger doesn't like:
Sub UpdateChart()
Set Currentchart = Sheets("External Data").ChartObjects(1).Chart
picnm = ThisWorkbook.Path & Application.PathSeparator & "chart.gif"
Line that VBA Debugger doesn't like --> Currentchart.Export filename:=picnm, FilterName:="GIF"
Image1.Picture = LoadPicture(picnm)
End Sub
The text in red is the line VBA Debugger stops on. Is there some kind of web/internet VBA component I'm forgetting to reinstall?
Any assistance on this would be appreciated.
------------
In this Excel document is a button with a macro assigned to it (which, again, has not changed for months). I click on this button and get the error, 'Runtime error 1004. Application defined or object defined error.' I have posted the macro code below (code that charts a range of cells populated witha web query - simple stuff) that the VBA debugger chokes on and have notated the specific line as well. It can't be anything with the VBA code or theworksheet because I can take the same Excel document to another computer with Office 2003 installed and it works fine. I'm thinking it has to be a missing Excel/VBA component in the new install - which also baffles me because when I reinstall Office, I do a complete install - getting everything.
Here's the macro code VBA debugger doesn't like:
Sub UpdateChart()
Set Currentchart = Sheets("External Data").ChartObjects(1).Chart
picnm = ThisWorkbook.Path & Application.PathSeparator & "chart.gif"
Line that VBA Debugger doesn't like --> Currentchart.Export filename:=picnm, FilterName:="GIF"
Image1.Picture = LoadPicture(picnm)
End Sub
The text in red is the line VBA Debugger stops on. Is there some kind of web/internet VBA component I'm forgetting to reinstall?
Any assistance on this would be appreciated.
------------