LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Code to create a Histogram

I am trying to use some VB code to generate a histogram of data. The input
range for the histogram can vary in the number of rows only. I am trying to
have the code be "generic" enough to know how many rows were filled with data
and use that info to populate the "Input Range" field for the histogram. The
code is as follows:

Application.Run "ATPVBAEN.xla!histogram", ActiveSheet.Range("B2:B3035"),
"Histo Chart", ActiveSheet.Range("$a$2:$a$58"), False, True, True, False

I would like to replace the first Activesheet.range statement with a
variable name. However, when I build the string value, I cannot place the
double quotes in the string (the macro thinks it is at the end of the string
value and won't insert the double quote).

The string I am trying to build is similar to :
InputRange = "Activesheet.range("b2:B" & ActualCount

I would then insert the InputRange variable for the first Activesheet.range
statement in the call to the Histogram. The macro gets lost after the second
double-quote.

Short of completely coding the histogram generation, does anyone have any
suggestions or ideas?

Please let me know.

Thanks
Don
 
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
How do I create a CORRECT histogram? Brian Chisholm Charts and Charting in Excel 1 April 21st 08 02:18 PM
create a Histogram? Deidra Charts and Charting in Excel 1 December 6th 06 09:51 PM
How do I create a histogram tish817 Charts and Charting in Excel 1 November 30th 06 11:53 PM
HOW CAN I CREATE A HISTOGRAM GRAPH FOR MY DATA? NNAMDI Excel Worksheet Functions 1 June 10th 06 08:24 PM
HOW CAN I CREATE A HISTOGRAM GRAPH FOR MY DATA? NNAMDI Excel Worksheet Functions 1 June 10th 06 07:35 PM


All times are GMT +1. The time now is 01:37 AM.

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"