Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Variables and graphs
Quick question....
If I have a VBA saying ActiveChart.SeriesCollection(1).Values = "=three!R3000C11:R4000tC11" can I replace it with ActiveChart.SeriesCollection(1).Values = "=three!RsetinC11:RsetoutC11" where setin and setout are declared variables? I'm a bit hazy on the syntax of this one. Cheers tp |
#2
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Variables and graphs
Try
ActiveChart.SeriesCollection(1).Values = "=three!R" & setin & "C11:" & Rsetout & "C11" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "teepee" wrote in message ... Quick question.... If I have a VBA saying ActiveChart.SeriesCollection(1).Values = "=three!R3000C11:R4000tC11" can I replace it with ActiveChart.SeriesCollection(1).Values = "=three!RsetinC11:RsetoutC11" where setin and setout are declared variables? I'm a bit hazy on the syntax of this one. Cheers tp |
#3
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Variables and graphs
I think Chip meant:
ActiveChart.SeriesCollection(1).Values _ = "=three!R" & setin & "C11:R" & setout & "C11" Chip Pearson wrote: Try ActiveChart.SeriesCollection(1).Values = "=three!R" & setin & "C11:" & Rsetout & "C11" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "teepee" wrote in message ... Quick question.... If I have a VBA saying ActiveChart.SeriesCollection(1).Values = "=three!R3000C11:R4000tC11" can I replace it with ActiveChart.SeriesCollection(1).Values = "=three!RsetinC11:RsetoutC11" where setin and setout are declared variables? I'm a bit hazy on the syntax of this one. Cheers tp -- Dave Peterson |
#4
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Variables and graphs
Yeah, that's what I meant. Fingers and brain weren't quite in
sync. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Dave Peterson" wrote in message ... I think Chip meant: ActiveChart.SeriesCollection(1).Values _ = "=three!R" & setin & "C11:R" & setout & "C11" Chip Pearson wrote: Try ActiveChart.SeriesCollection(1).Values = "=three!R" & setin & "C11:" & Rsetout & "C11" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "teepee" wrote in message ... Quick question.... If I have a VBA saying ActiveChart.SeriesCollection(1).Values = "=three!R3000C11:R4000tC11" can I replace it with ActiveChart.SeriesCollection(1).Values = "=three!RsetinC11:RsetoutC11" where setin and setout are declared variables? I'm a bit hazy on the syntax of this one. Cheers tp -- Dave Peterson |
#5
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Variables and graphs
"Dave Peterson" wrote I think Chip meant: ActiveChart.SeriesCollection(1).Values = "=three!R" & setin & "C11:R" & setout & "C11" Many thanks. I think it's worked but I won't know till I've figured out how to set this darn variable in the first place8-) It's in a userform button on mediaplayer as an object and it goes Private Sub CommandButton4_Click() UserForm1.Height = 230 Dim setin As Variant setin = ActiveWorkbook.ActiveSheet.Cells(1, 2).Value End Sub It's supposed to take the value of the formula in cell B2 but at the moment it's just returning 1 for everything. 8-( tp |
#6
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Variables and graphs
If you want the value from B2, you need to change
ActiveWorkbook.ActiveSheet.Cells(1, 2).Value to ActiveWorkbook.ActiveSheet.Cells(2, 2).Value or ActiveWorkbook.ActiveSheet.Range("B2").Value -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "teepee" wrote in message ... "Dave Peterson" wrote I think Chip meant: ActiveChart.SeriesCollection(1).Values = "=three!R" & setin & "C11:R" & setout & "C11" Many thanks. I think it's worked but I won't know till I've figured out how to set this darn variable in the first place8-) It's in a userform button on mediaplayer as an object and it goes Private Sub CommandButton4_Click() UserForm1.Height = 230 Dim setin As Variant setin = ActiveWorkbook.ActiveSheet.Cells(1, 2).Value End Sub It's supposed to take the value of the formula in cell B2 but at the moment it's just returning 1 for everything. 8-( tp |
#7
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Variables and graphs
"teepee" wrote It's supposed to take the value of the formula in cell B2 I meant A2 of course |
#8
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Variables and graphs
"Chip Pearson" wrote ActiveWorkbook.ActiveSheet.Cells(2, 2).Value or ActiveWorkbook.ActiveSheet.Range("B2").Value No still getting a 1 value.It's almost as though it won't accept a value from a userform button on wmp when it is an active object. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiiple graphs | Charts and Charting in Excel | |||
mutiple regression help | Excel Discussion (Misc queries) |