New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Multiple Crossat

Macros, VBA, Excel Automation, etc.

Multiple Crossat

Postby Dinorx1 » Wed Mar 30, 2016 10:37 pm

Hi
Wondering the easiest way to create 2x crossesat code, for datevalue now and a say 180 days time?
my crosses custom code didn't work,
Regards
Dinorx

Code: Select all
Private Sub Chart_Activate()

    ActiveChart.Axes(xlValue).Select
    ActiveChart.Axes(xlValue).MinimumScale = DateValue(Now() - 1180)
    ActiveChart.Axes(xlValue).MaximumScale = DateValue(Now() + 2000)
    ActiveChart.Axes(xlValue).CrossesAt = DateValue(Now() + 0)
    'ActiveChart.Axes(xlValue).CrossesCustom = DateValue(Now() + 180)
   
End Sub
  • 0

Dinorx1
Rookie
 
Posts: 1
Joined: Mar 30, 2016
Reputation: 0
Excel Version: 2010

Re: Multiple Crossat

Postby pecoflyer » Sun Apr 03, 2016 9:47 am

Hi and welcome to the board

As you can see, we have highlighted in red font a text on each page of the VBA forum asking to wrap code with code tags.

Please do so in the future, I will do it for you this time. Thank you
  • 0

Last edited by pecoflyer on Sun Apr 03, 2016 9:49 am, edited 1 time in total.
Reason: added code tags
A relevant topic title helps get faster and more answers
pecoflyer
Moderator
 
Posts: 1274
Joined: Jan 24, 2012
Location: Belgium
Reputation: 39
Excel Version: 2003/2007/2010


Return to Macros and VBA Questions

Who is online

Users browsing this forum: No registered users and 63 guests

cron