Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba variable
Looks like I am not handling the variable properly in the
following. Can you tell me what I am doing wrong? the 5th line causes an error. Sub Macro1() Dim point As Integer point = Worksheets("open").Range("aa1").Value ActiveSheet.ChartObjects("Chart 10").Activate ActiveChart.SeriesCollection(1).Points(point).Sele ct With Selection .MarkerBackgroundColorIndex = 3 .MarkerStyle = xlCircle .MarkerSize = 11 End With End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba variable
What error are you getting? Your code works for me.
-- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Paul" wrote in message ... Looks like I am not handling the variable properly in the following. Can you tell me what I am doing wrong? the 5th line causes an error. Sub Macro1() Dim point As Integer point = Worksheets("open").Range("aa1").Value ActiveSheet.ChartObjects("Chart 10").Activate ActiveChart.SeriesCollection(1).Points(point).Sele ct With Selection .MarkerBackgroundColorIndex = 3 .MarkerStyle = xlCircle .MarkerSize = 11 End With End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba variable
I donīt know: your code worked perfectly in my PC.
What does the error message say?? rgd Mika |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba variable
error message = "unable to get points property of the
series class." -----Original Message----- I donīt know: your code worked perfectly in my PC. What does the error message say?? rgd Mika . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba variable
error message = "unable to get points property of the
series class." -----Original Message----- What error are you getting? Your code works for me. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Paul" wrote in message ... Looks like I am not handling the variable properly in the following. Can you tell me what I am doing wrong? the 5th line causes an error. Sub Macro1() Dim point As Integer point = Worksheets("open").Range("aa1").Value ActiveSheet.ChartObjects("Chart 10").Activate ActiveChart.SeriesCollection(1).Points(point).Sele ct With Selection .MarkerBackgroundColorIndex = 3 .MarkerStyle = xlCircle .MarkerSize = 11 End With End Sub . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba variable
Hummmm, go for the "obvious" things:
do you have a value in the cell aa1 ??? do you have a serie 1 ??? It looks to me the problem is in your worksheet and not in the code. Hi, Chip: if you can help me with the working days function it would be great... Rgds Mika |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba variable
Hummmmm is right! aa1 contains integer. chart contains
series 1 , variable is not outside the series display range. the code works fine in my computer too -- only if I use a number rather than the variable - point. something with the variable causes it to fail -----Original Message----- Hummmm, go for the "obvious" things: do you have a value in the cell aa1 ??? do you have a serie 1 ??? It looks to me the problem is in your worksheet and not in the code. Hi, Chip: if you can help me with the working days function it would be great... Rgds Mika . |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba variable
Did you debug the var point after reading the value ??
for example: debug.print point or msgbox point ?? it is reading the value ? Rgd Mika |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
setting a range variable equal to the value of a string variable | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming | |||
Pivot Table - Object variable or with block variable not set? | Excel Programming |