LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Selecting a chart in a worksheet with VBA trouble

Thank you for your help. It works now!

Kind regards,
Sebastiaan.

"Peter T" <peter_t@discussions wrote in message
...
Objects with names that include most types of punctuation are not
accessible
at the Drawingobject level, or in your case as ChartObject. I would
suggest
don't include the brackets or the comma in "Die(2,8)", try instead
something
like "Die_2_8".

But if you really must, or to get you out of trouble, go via Shapes. Eg

Set myChartObject = mySheet.Shapes("Die(2,8)").DrawingObject
or
Set myChart = mySheet.Shapes("Die(2,8)").DrawingObject.Chart

Probably better to start by attempting to set a Shape reference first,
then
the Chartobject or Chart.

I haven't looked at the rest of your code but normally not necessary to
Activate or Select the chart for whatever it is you want to do with it.

Regards,
Peter T



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble Selecting a Range in VBA MJatAflac Excel Programming 5 November 30th 09 04:58 PM
Trouble with selecting multiple ranges of data markag Excel Worksheet Functions 2 June 23rd 06 04:35 PM
Trouble selecting chart in macro Jeff Excel Programming 6 April 15th 06 01:31 AM
Selecting and moving chart(s) within a worksheet using keyboard ke xppuser Charts and Charting in Excel 1 February 28th 06 11:38 AM
trouble selecting a named cell john foster[_2_] Excel Programming 3 February 16th 06 11:54 AM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"