LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Newbie-question: recorded macro does not work - why?

BTW: How did you get the macro recorder to also record these ranges???

If I record when manually creating a histogram, the first few parameters
end up being empty as I described in my intial append, i.e.:
----------------------
....
Application.Run "ATPVBAEN.XLA!Histogram", , , , _
False, False, False, False
....
----------------------

Is there some "more complete" recording mode or some trick to do this?

Michael


"Tom Ogilvy" wrote in message
...
First, your arugments have to be passed as Ranges, not strings.

for instance, if I record it I get:

Application.Run "ATPVBAEN.XLA!Histogram", _
ActiveSheet.Range("$B$4:$B$27"), _
"", ActiveSheet.Range("$D$4:$D$9"), _
False, False, False, True

as an example.

You can find documentation in the help files for the Excel4 macro
language:

http://office.microsoft.com/downloads/2000/Xlmacro.aspx

http://support.microsoft.com/default...85&Product=xlw
Macrofun.exe File Available on Online Services
xl97 (old winhelp format)

http://support.microsoft.com/default...66&Product=xlw
XL97: Macro97.exe File Available on Online Services
xl97 (old winhelp format)

--
Regards,
Tom Ogilvy



"Michael Moser" wrote:

I have enabled the add-in ("Analysis ToolPak" and ("Analysis ToolPak
VBA") in Excel (this package seems to come with Excel by default - I
didn't have to install anything special, just had to check the
tick-mark
in Tools = Add-Ins). This made another Tools-menu entry appear:
"Data
Analysis"

This all works fine, but now I wanted to automatize a few things to
save
me some substantial typing and clicking when (re-)generating charts.

So I recorded a macro that uses a function from that add-in (Tools =
Data Analysis = Histogram). In the recorded macro of this action
shows
up as:
----------------------
....
Application.Run "ATPVBAEN.XLA!Histogram", , , , False, False,
False, _
False

....
----------------------

When I want to execute/replay the macro I always get an error popup
telling me:

"Histogram - inout range must be a contiguous reference".

I thought, that maybe the series of empty ', , , ,' indicates some
missing or non-recorded range inputs (namely the input range, the
"buckets" and the output range that I entered during recording) and
tried to fill the void so that the line read
----------------------
....
Application.Run "ATPVBAEN.XLA!Histogram", "$B$10:$K$508",
"$O$2:$O$255", "$P$1:$Q$256", False, False, False, _
False

....
----------------------
.... but that did not work either and so I am stuck.

Any idea, what to do here or what I am missing? How/where can I find
some documentation re. what parameters that Histogram-operation
expects?

Any help would be greatly appreciated!

Michael




 
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
Newbie Macro Question rich Excel Discussion (Misc queries) 1 August 23rd 07 07:15 PM
I recorded a macro "PrintSetUp" in excel but does not work Niranjan Excel Worksheet Functions 1 August 10th 07 02:57 PM
newbie macro question Knox Excel Programming 4 May 14th 06 06:07 AM
Newbie he I have a question about a print macro I am trying to write... Kyaba[_2_] Excel Programming 5 May 3rd 06 10:45 PM
flip an autoshape using VBA- recorded macro doesn't work Keith R[_3_] Excel Programming 0 October 23rd 03 08:32 PM


All times are GMT +1. The time now is 08:00 PM.

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

About Us

"It's about Microsoft Excel"