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: 1
Default how to select current range


Hi all,
While I'm comfortable with programming, I'm rusty and I have never see
VBA before.

I'm trying to make a macro that makes a graph with trendline based o
whatever range of numbers I have selected. I guess that means that i
the code below, I want to change the sheet and range references t
whatever is currently selected. Your answer will be appreciated.
Thanks.

Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("R
INT").Range("AC12:AC15")
ActiveChart.Location Whe=xlLocationAsObject, Name:="R1 INT"
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Trendlines.Add(Typ e:=xlLinear
Forward:=0, _
Backward:=0, DisplayEquation:=True
DisplayRSquared:=False).Select
ActiveChart.SeriesCollection(1).Trendlines(1).Data Label.Select
Selection.Left = 141
Selection.Top = 1
End Su

--
miker
-----------------------------------------------------------------------
mikerr's Profile: http://www.excelforum.com/member.php...fo&userid=2583
View this thread: http://www.excelforum.com/showthread.php?threadid=39219

 
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
Data: select a cell x rows below the current, where x is designate manxman Excel Discussion (Misc queries) 1 July 18th 06 05:32 PM
Macro €“ select all cells in current range Mary Ann Excel Discussion (Misc queries) 3 December 12th 05 07:19 AM
Select current region and print Tempy Excel Programming 2 April 20th 05 05:47 AM
UserForm to select current month or earlier Steve Excel Discussion (Misc queries) 2 January 21st 05 09:41 PM
Select current region less one column Soniya[_2_] Excel Programming 1 January 12th 04 02:05 PM


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