Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default shape remains selected

Based upon user selections, I delete and copy in flags and logo's in a chart.
Somehow, in some charts, the shape I copied in remains selected. This is
really no problem in Excel 2003 running under Vista, neither in Excel 2007
running under Vista, but it is in Excel 2007 running under XP. Charts become
totaly corrupted and unpresentable. Code used :

ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select

ActiveChart.Shapes(LogoOld).Select
Selection.Delete

Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select

When I select the ChartArea after running the code, I see that the LogoNew
is selected. When I select a title in the graph, the LogoNew becomes
unselected, but then the title remains selected. The only way to get rid of
it is delete the LogoNew and Undo afterwards (but I can not find VB code to
reproduce this).

Question is : How do I Unselect a shape on a Chart?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default shape remains selected


Does this work for you?



VBA Code:
--------------------



ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select

ActiveChart.Shapes(LogoOld).Select
Selection.Delete

Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
Application.CutCopyMode=False
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select

--------------------





Henk;645900 Wrote:

Based upon user selections, I delete and copy in flags and logo's in a
chart.
Somehow, in some charts, the shape I copied in remains selected. This
is
really no problem in Excel 2003 running under Vista, neither in Excel
2007
running under Vista, but it is in Excel 2007 running under XP. Charts
become
totaly corrupted and unpresentable. Code used :

ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select

ActiveChart.Shapes(LogoOld).Select
Selection.Delete

Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select

When I select the ChartArea after running the code, I see that the
LogoNew
is selected. When I select a title in the graph, the LogoNew becomes
unselected, but then the title remains selected. The only way to get
rid of
it is delete the LogoNew and Undo afterwards (but I can not find VB
code to
reproduce this).

Question is : How do I Unselect a shape on a Chart?r


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=180020

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default shape remains selected

Simon,

No, it does not.

tHenks

"Simon Lloyd" wrote:


Does this work for you?




VBA Code:
--------------------




ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select

ActiveChart.Shapes(LogoOld).Select
Selection.Delete

Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
Application.CutCopyMode=False
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select


--------------------






Henk;645900 Wrote:

Based upon user selections, I delete and copy in flags and logo's in a
chart.
Somehow, in some charts, the shape I copied in remains selected. This
is
really no problem in Excel 2003 running under Vista, neither in Excel
2007
running under Vista, but it is in Excel 2007 running under XP. Charts
become
totaly corrupted and unpresentable. Code used :

ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select

ActiveChart.Shapes(LogoOld).Select
Selection.Delete

Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select

When I select the ChartArea after running the code, I see that the
LogoNew
is selected. When I select a title in the graph, the LogoNew becomes
unselected, but then the title remains selected. The only way to get
rid of
it is delete the LogoNew and Undo afterwards (but I can not find VB
code to
reproduce this).

Question is : How do I Unselect a shape on a Chart?r


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=180020

Microsoft Office Help

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default shape remains selected


Maybe then you could use:


VBA Code:
--------------------


ActiveChart.Deselect
--------------------



Instead of (or aswell as):


VBA Code:
--------------------


Application.CutCopyMode=False
--------------------




Henk;647035 Wrote:

Simon,

No, it does not.

tHenks

"Simon Lloyd" wrote:


Does this work for you?




VBA Code:
--------------------




ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select

ActiveChart.Shapes(LogoOld).Select
Selection.Delete

Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
Application.CutCopyMode=False
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select


--------------------






Henk;645900 Wrote:

Based upon user selections, I delete and copy in flags and logo's in

a
chart.
Somehow, in some charts, the shape I copied in remains selected. This
is
really no problem in Excel 2003 running under Vista, neither in Excel
2007
running under Vista, but it is in Excel 2007 running under XP. Charts
become
totaly corrupted and unpresentable. Code used :

ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select

ActiveChart.Shapes(LogoOld).Select
Selection.Delete

Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select

When I select the ChartArea after running the code, I see that the
LogoNew
is selected. When I select a title in the graph, the LogoNew becomes
unselected, but then the title remains selected. The only way to get
rid of
it is delete the LogoNew and Undo afterwards (but I can not find VB
code to
reproduce this).

Question is : How do I Unselect a shape on a Chart?r


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' ('The Code Cage - Microsoft Office Help -

Microsoft Office Discussion' (http://www.thecodecage.com))

------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: 'shape remains selected - The Code Cage Forums'

(http://www.thecodecage.com/forumz/sh...d.php?t=180020)

'Microsoft Office Help' (http://www.thecodecage.com)

.



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=180020

Microsoft Office Help

Reply
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
Which shape is selected H.G. Lamy Excel Programming 2 January 27th 10 02:27 PM
I have a problem with determining if a shape is selected. AndyT Excel Programming 6 May 16th 07 06:37 PM
Identifying the selected Shape Jerry[_20_] Excel Programming 1 August 7th 05 07:15 AM
VBA Help with changing shape color for selected shapes only Nimrod[_2_] Excel Programming 8 April 29th 05 01:38 PM
Toolbar's shape remains on the screen Haldun Alay[_3_] Excel Programming 2 October 15th 03 08:15 PM


All times are GMT +1. The time now is 05:05 PM.

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

About Us

"It's about Microsoft Excel"