Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Passing variables for range series charts, what to do with post macro run; unable to


I have two headaches, 1. i have searched a large data base and found the
address of the values I want to add to my chart. If my starting address
is Strt1 and ends Ends1, I would like to pass these variables because
unlike the code below I do not know where they might be.

Charts.Add
ActiveChart.ChartType = xlLineMarkers

For i = 1 To j
ActiveChart.SeriesCollection.NewSeries
With Worksheets(i)
ActiveChart.SeriesCollection(i).XValues = .Range(.Cells(1, 1),
..Cells(20, 1)) 'Here I want to use variables to be my range,
ActiveChart.SeriesCollection(i).Values = .Range(.Cells(1, 2 ),
..Cells(20, 2))
End With
Next nic
ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1"

2. second question, I am using userform, i have set to so that I can
type delete my excel while the userform is on top, but when I ran my
macros and it does what its work, it does not allow me to do anything
unless i close the form.
Help, I appreciate your time in advance, thanks

Osman


--
osman
------------------------------------------------------------------------
osman's Profile: http://www.excelforum.com/member.php...o&userid=34226
View this thread: http://www.excelforum.com/showthread...hreadid=544064

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Passing variables for range series charts, what to do with post macro run; unable to

Are Strt1 and Ends1 strings that contain something like A1, A20

ActiveChart.SeriesCollection(i).XValues = .Range(Strt1, Ends1)


when you show the form (xl2000 or later)

Userform1.Show vbModeless

--
Regards,
Tom Ogilvy

"osman" wrote in message
...

I have two headaches, 1. i have searched a large data base and found the
address of the values I want to add to my chart. If my starting address
is Strt1 and ends Ends1, I would like to pass these variables because
unlike the code below I do not know where they might be.

Charts.Add
ActiveChart.ChartType = xlLineMarkers

For i = 1 To j
ActiveChart.SeriesCollection.NewSeries
With Worksheets(i)
ActiveChart.SeriesCollection(i).XValues = .Range(.Cells(1, 1),
Cells(20, 1)) 'Here I want to use variables to be my range,
ActiveChart.SeriesCollection(i).Values = .Range(.Cells(1, 2 ),
Cells(20, 2))
End With
Next nic
ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1"

2. second question, I am using userform, i have set to so that I can
type delete my excel while the userform is on top, but when I ran my
macros and it does what its work, it does not allow me to do anything
unless i close the form.
Help, I appreciate your time in advance, thanks

Osman


--
osman
------------------------------------------------------------------------
osman's Profile:

http://www.excelforum.com/member.php...o&userid=34226
View this thread: http://www.excelforum.com/showthread...hreadid=544064



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
combination charts: two variables in one series? Bob with Q Charts and Charting in Excel 1 September 14th 06 09:55 AM
Passing variables between a form and macro David New Users to Excel 1 October 5th 05 04:42 AM
Passing variables between a form and macro David New Users to Excel 4 September 23rd 05 11:57 AM
Passing Variables to another macro Jeff Excel Programming 3 January 16th 05 03:41 AM
Passing cell addressess to variables to be use in range ExcelMonkey[_146_] Excel Programming 2 June 11th 04 09:31 PM


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