Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to create VBA script to run Report Manager function.

I am trying to create a VBA script (macro) that will
allow me to run a report manager function from a button
on a spreadsheet.

I recorded a macro of running the report manager function
and received this for code:

Application.ExecuteExcel4Macro String:="Report
Manager"
Application.ExecuteExcel4Macro String:="Report
Manager"
Application.ExecuteExcel4Macro String:= _
"REPORT.PRINT(""Profit and Loss Report
Bundle"",1)"

I then put this code in the buttons on click event and
try to run it but nothing happens.

If I run the report manager function from the menu first
and then run the macro via the push button all works as
expected.

In the doc on the ExecuteExcel4Macro function I found the
statement:

The Microsoft Excel 4.0 macro isn't evaluated in the
context of the current workbook or sheet. This means that
any references should be external and should specify an
explicit workbook name. For example, to run the Microsoft
Excel 4.0 macro "My_Macro" in Book1 you must use "Book1!
My_Macro()". If you don't specify the workbook name, this
method fails.


This leads me to believe that I need to tell the
functions where they are coming from. I have tried every
syntax that I can think of and am not able to resolve
this issue.

Any help would be appreciated (as you probably can tell
by the way I refer to things VBA is not my strong suite).

TIA...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Manager WCO Excel Discussion (Misc queries) 3 December 30th 06 02:16 AM
Report Manager Barbara A Excel Discussion (Misc queries) 0 October 4th 06 05:46 PM
Header in Report Manager Report Steve K Excel Discussion (Misc queries) 0 March 7th 06 07:32 PM
Report Manager Add-In Sue Excel Discussion (Misc queries) 2 March 11th 05 03:57 PM
Report Manager Kish Patel Excel Discussion (Misc queries) 1 February 16th 05 11:09 PM


All times are GMT +1. The time now is 08:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"