Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capturing BottomRightCell in a Variable
Anyone see what is wrong with this code. I'm getting an 'object required' error:
Dim r As Range Set r = Sheet2.ChartObjects("myChart").BottomRightCell.Add ress Seems pretty straightforward, but it won't work. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capturing BottomRightCell in a Variable
usr58201 wrote:
Anyone see what is wrong with this code. I'm getting an 'object required' error: Dim r As Range Set r = Sheet2.ChartObjects("myChart").BottomRightCell.Add ress Seems pretty straightforward, but it won't work. ..Address is a string, not a range (or any other type of object that requires "Set"). Either do this: Dim r As Range Set r = Sheet2.ChartObjects("myChart").BottomRightCell ....or this: Dim r As String r = Sheet2.ChartObjects("myChart").BottomRightCell.Add ress -- I expect wisdom from you. The least you can do is pretend you are wise. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Capturing current Worksheet Name as a variable | Excel Programming | |||
Capturing a row being inserted | Excel Programming | |||
Capturing Time | Excel Programming | |||
BottomRightCell ignores hidden cells | Excel Programming | |||
Capturing Decimal Values in Variable - Losing decimals when summin | Excel Programming |