![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 20
|
I would like to create a macro that would capture values (that change periodically) on a tab then use them to set the scale for both the X & Y axis of an Excel XP chart. I have a couple dozen charts in this file that woudl need this done. If I understand correctly, this would require VBA coding instead of basic macro programming.
Any help would be appreciated. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Location: Greenwood, SC
Posts: 677
|
I'm not sure what the difference between VBA coding and basic macro programming is (they mean the same thing to me), but I'll start with quick response.
You can change the ranges of a chart by setting the MaximumScale and MinimumScale properties. Here is an example:
Note that your sheet names and chart names will hopefully be different. Try that out for a start... K P.S. One good way to troubleshoot this code (or create your own) is to record a macro doing a manual setting of the axes and see what names were used. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 20
|
Thanks for your help with this . I really appreciate it.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|