Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel file with a button to run a macro: select sheets and
print preview. It works when the file is opened with Excel. The macro is simple: Sub PrintMacro() Sheets(Array("tables", "data", "charts")).Select Sheets("tables").Activate ActiveWindow.SelectedSheets.PrintPreview End Sub I need to open it from web. When user selects the file, the web app retrieves the file and responses to open an Excel file. So I built a web app using Weblogic and Struts. After user clicks the link to the file, an Excel file was loaded from the server with chart, data, and a button to trigger the macro. The title bar shows: Microsoft Excel - http://myhostname:myportnumber/myweb...?file=20040624 [Group] [Read only]. It works so far. But when click the button, an Excel message box appears: The macro ''reportaction.do?file=20040624'!PrintMacro' cannot be found. If look into Tools/Marco, PrintMacro can be found in 3 "Macros in" status: 1. All Open Workbooks, 2. This Workbook, and 3. reportaction.do?file=20040624. Click Run in Macro window, it runs in 3 status. Or if the file saved and reopend, click the button and it works. Could anyone know why is it and the way to solve the problem? Thanks so much! Sam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I call IE browser (Back button) through Excel macro? | Excel Discussion (Misc queries) | |||
Button fails to call macro when open an Excel via Intranet | Excel Discussion (Misc queries) | |||
.ONACTION macro call fails | Excel Discussion (Misc queries) | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
How to call File Open / Save Window in a Macro | Excel Programming |