Create a sliding line on a chart

roscoe

Well-known Member
Joined
Jun 4, 2002
Messages
1,046
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'll start by apologizing for my vagueness but I'm working on a proprietary project of which I can't disclose much, but seeking advice for a trick I'd like to try.

I have an XY chart that has time across the X-axis (bottom) and a lot of horizontal lines showing events by start/stop times (staggered vertically). (If you want to envision a Gantt chart you wouldn't be far off).

Sometimes the user needs to plan an event of variable duration and needs to fit it into a suitable time slot. My desire is to offer a button that will insert a horizontal line (duration defined by the user and easily editable) with a scroll bar to slide the line left/right so the user can quickly visualize the best fit.

The dialogue box has several options, only one of which is linkable. How would I use VBA to populate those options (In their infinite wisdom, my IT shop elected to NOT install the VBA help files...#grrrr).

I'd also like to hide the scroll bar until it is "invoked".

Seeking ideas from this esteemed and august group!

Thanks!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Re: help: Want to create a sliding line on a chart

Sorry if I wasn't clear. Adding a line is the easy part (I already have many of them via VBA...my primary question is how to use a scroll bar to move one left/right on the chart.

But thanks!
 
Upvote 0
Re: help: Want to create a sliding line on a chart

Once again with more clarity :)

I'm trying to build the line and populate the scroll options via VBA. I can't figure out the calls to do that.
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,453
Members
448,898
Latest member
drewmorgan128

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top