![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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! |
| Ads |
|
#2
|
|||
|
|||
|
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. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Capturing current Worksheet Name as a variable | Jimbob | Excel Programming | 3 | April 4th 08 08:25 PM |
| Capturing a row being inserted | John | Excel Programming | 3 | June 22nd 07 02:23 PM |
| Capturing Time | The Excelerator[_2_] | Excel Programming | 1 | February 27th 07 02:22 PM |
| BottomRightCell ignores hidden cells | [email protected] | Excel Programming | 13 | September 11th 06 03:38 PM |
| Capturing Decimal Values in Variable - Losing decimals when summin | Mark | Excel Programming | 1 | September 14th 05 05:26 PM |