LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ric ric is offline
external usenet poster
 
Posts: 11
Default Problem with a defined variable

Hi again,

Heres the code, it works fine till it gets to the last line i've pasted. The
graph was created via recording a macro and replacing the range "C1:AM5"
with "MyRange".


Public MyRange As Range
_________________________

Sub Cumulative_Data()

Sheets("cum_data").Select
Start = 2
t1 = Sheets("cum_data").Cells(Start, 1).Value
t2 = Sheets("cum_data").Cells(Start, 2).Value
TheTitle = t2 & " " & "-" & " " & t1
Fname = t2
Set MyRange = Range("C1:AM5")
MyRange.Select

Call Cum_data_graph

End Sub
_____________________________

Sub Cum_data_graph()
'
' This macro makes a line graph
'
Application.ScreenUpdating = False
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("cum_data").Range(MyRange),
PlotBy _
:=xlRows


 
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
create defined name using variable file name in reference hala Excel Worksheet Functions 3 December 14th 09 01:10 PM
Variable sum from defined input David Excel Worksheet Functions 7 March 10th 09 06:26 AM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
publically defined command bar variable problem Joe Excel Programming 1 March 5th 04 02:22 PM
Variable Not Defined? objPivotCache BEE Excel Programming 1 December 15th 03 05:02 PM


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