Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User selection from a chart

I have a VB app that uses a VBA script to create a sheet with data and then
another sheet with a chart representing that data in graphical form. The
sheet with the data on it has formulas that are run on a subset of the data.
Currently these formulas are hardcoded with the range to calculate from. But
I need to change it so the user can select a starting and ending point from
the chart (on the other page) that the formulas will use to calculate from.

I am new to Office scripting so any ideas on how to do this (if it's even
possible) would be helpful.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default User selection from a chart

You can determine which chart element is selected using the Selection
object, but it's tedious to do this to get more than one selection, because
you have to make the user stop, select something else. then click something
to continue the code.

You can also use chart events to respond to mouse actions in the chart. It's
a bit tricky, especially if you've done little programming, but here's a
reasonably straightforward tutorial:

http://www.computorcompanion.com/LPMArticle.asp?ID=221

I've used this technique to do much the same as you, let the user easily
select the first and last point for detailed analysis.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Nathan Smith" wrote in message
...
I have a VB app that uses a VBA script to create a sheet with data and then
another sheet with a chart representing that data in graphical form. The
sheet with the data on it has formulas that are run on a subset of the
data.
Currently these formulas are hardcoded with the range to calculate from.
But
I need to change it so the user can select a starting and ending point
from
the chart (on the other page) that the formulas will use to calculate
from.

I am new to Office scripting so any ideas on how to do this (if it's even
possible) would be helpful.

Thanks.



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
VBA Code User Range Selection jimbo Excel Discussion (Misc queries) 5 January 5th 10 02:31 AM
sheet selection via user click (yez) Yossi evenzur[_2_] Excel Programming 1 January 24th 08 03:27 PM
type of selection if selection is chart Chimanrao Excel Programming 0 November 11th 05 03:44 AM
refer to user selection someguy Excel Programming 11 February 25th 05 03:17 AM
User selection Samir[_2_] Excel Programming 3 January 7th 04 03:06 PM


All times are GMT +1. The time now is 10:01 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"