Quick question....
If I have a VBA saying
ActiveChart.SeriesCollection(1).Values = quot;=three!R3000C11:R4000tC11quot;
can I replace it with
ActiveChart.SeriesCollection(1).Values = quot;=three!RsetinC11:RsetoutC11quot;
where setin and setout are declared variables? I'm a bit hazy on the syntax
of this one.
Cheers
tp
Try
ActiveChart.SeriesCollection(1).Values = quot;=three!Rquot; amp; setin amp;
quot;C11:quot; amp; Rsetout amp; quot;C11quot;--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.comquot;teepeequot; gt; wrote in message
...
gt; Quick question....
gt;
gt; If I have a VBA saying
gt;
gt; ActiveChart.SeriesCollection(1).Values =
gt; quot;=three!R3000C11:R4000tC11quot;
gt;
gt; can I replace it with
gt;
gt; ActiveChart.SeriesCollection(1).Values =
gt; quot;=three!RsetinC11:RsetoutC11quot;
gt;
gt; where setin and setout are declared variables? I'm a bit hazy
gt; on the syntax of this one.
gt;
gt; Cheers
gt;
gt; tp
gt;
I think Chip meant:
ActiveChart.SeriesCollection(1).Values _
= quot;=three!Rquot; amp; setin amp; quot;C11:Rquot; amp; setout amp; quot;C11quot;
Chip Pearson wrote:
gt;
gt; Try
gt;
gt; ActiveChart.SeriesCollection(1).Values = quot;=three!Rquot; amp; setin amp;
gt; quot;C11:quot; amp; Rsetout amp; quot;C11quot;
gt;
gt; --
gt; Cordially,
gt; Chip Pearson
gt; Microsoft MVP - Excel
gt; Pearson Software Consulting, LLC
gt; www.cpearson.com
gt;
gt; quot;teepeequot; gt; wrote in message
gt; ...
gt; gt; Quick question....
gt; gt;
gt; gt; If I have a VBA saying
gt; gt;
gt; gt; ActiveChart.SeriesCollection(1).Values =
gt; gt; quot;=three!R3000C11:R4000tC11quot;
gt; gt;
gt; gt; can I replace it with
gt; gt;
gt; gt; ActiveChart.SeriesCollection(1).Values =
gt; gt; quot;=three!RsetinC11:RsetoutC11quot;
gt; gt;
gt; gt; where setin and setout are declared variables? I'm a bit hazy
gt; gt; on the syntax of this one.
gt; gt;
gt; gt; Cheers
gt; gt;
gt; gt; tp
gt; gt;
--
Dave Peterson
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.comquot;Dave Petersonquot; gt; wrote in message
...
gt;I think Chip meant:
gt;
gt; ActiveChart.SeriesCollection(1).Values _
gt; = quot;=three!Rquot; amp; setin amp; quot;C11:Rquot; amp; setout amp; quot;C11quot;
gt;
gt;
gt;
gt; Chip Pearson wrote:
gt;gt;
gt;gt; Try
gt;gt;
gt;gt; ActiveChart.SeriesCollection(1).Values = quot;=three!Rquot; amp; setin amp;
gt;gt; quot;C11:quot; amp; Rsetout amp; quot;C11quot;
gt;gt;
gt;gt; --
gt;gt; Cordially,
gt;gt; Chip Pearson
gt;gt; Microsoft MVP - Excel
gt;gt; Pearson Software Consulting, LLC
gt;gt; www.cpearson.com
gt;gt;
gt;gt; quot;teepeequot; gt; wrote in message
gt;gt; ...
gt;gt; gt; Quick question....
gt;gt; gt;
gt;gt; gt; If I have a VBA saying
gt;gt; gt;
gt;gt; gt; ActiveChart.SeriesCollection(1).Values =
gt;gt; gt; quot;=three!R3000C11:R4000tC11quot;
gt;gt; gt;
gt;gt; gt; can I replace it with
gt;gt; gt;
gt;gt; gt; ActiveChart.SeriesCollection(1).Values =
gt;gt; gt; quot;=three!RsetinC11:RsetoutC11quot;
gt;gt; gt;
gt;gt; gt; where setin and setout are declared variables? I'm a bit
gt;gt; gt; hazy
gt;gt; gt; on the syntax of this one.
gt;gt; gt;
gt;gt; gt; Cheers
gt;gt; gt;
gt;gt; gt; tp
gt;gt; gt;
gt;
gt; --
gt;
gt; Dave Peterson
quot;Dave Petersonquot; gt; wrote
gt;I think Chip meant:
gt;
gt; ActiveChart.SeriesCollection(1).Values = quot;=three!Rquot; amp; setin amp; quot;C11:Rquot; amp;
gt; setout amp; quot;C11quot;
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
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(quot;B2quot;).Value
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
quot;teepeequot; gt; wrote in message
...
gt;
gt; quot;Dave Petersonquot; gt; wrote
gt;
gt;gt;I think Chip meant:
gt;gt;
gt;gt; ActiveChart.SeriesCollection(1).Values = quot;=three!Rquot; amp; setin amp;
gt;gt; quot;C11:Rquot; amp; setout amp; quot;C11quot;
gt;
gt; Many thanks. I think it's worked but I won't know till I've
gt; figured out how to set this darn variable in the first place8-)
gt; It's in a userform button on mediaplayer as an object and it
gt; goes
gt;
gt; Private Sub CommandButton4_Click()
gt; UserForm1.Height = 230
gt; Dim setin As Variant
gt; setin = ActiveWorkbook.ActiveSheet.Cells(1, 2).Value
gt; End Sub
gt;
gt; It's supposed to take the value of the formula in cell B2 but
gt; at the moment it's just returning 1 for everything. 8-(
gt;
gt; tp
gt;
gt;
quot;teepeequot; gt; wrote
gt; It's supposed to take the value of the formula in cell B2
I meant A2 of course
quot;Chip Pearsonquot; gt; wrote
gt; ActiveWorkbook.ActiveSheet.Cells(2, 2).Value
gt; or
gt; ActiveWorkbook.ActiveSheet.Range(quot;B2quot;).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.
- Apr 13 Sun 2008 20:43
Variables and graphs
close
全站熱搜
留言列表
發表留言