Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 38
Default PasteFace-Problem

Hi

I created an entry in the commandbar with a customized icon. The code is the
following:

Sub Test()
Dim cbrMenuCtrl As CommandBarButton

Worksheets("Init").Shapes(1).Copy

Set cbrMenuCtrl = Application.CommandBars("Tools").Controls.Add
With cbrMenuCtrl
.Caption = "Hello"
.OnAction = ThisWorkbook.Name & "!blabla"
.PasteFace
End With

Application.CutCopyMode = False

End Sub


The problem is that the icon remains in the Excel memory. When I enter the
paste command the icon will be pasted?!? How to free the memory?

Tom



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default PasteFace-Problem

Sub Test()
Dim cbrMenuCtrl As CommandBarButton

Worksheets("Init").Shapes(1).Copy

Set cbrMenuCtrl = Application.CommandBars("Tools").Controls.Add
With cbrMenuCtrl
.Caption = "Hello"
.OnAction = ThisWorkbook.Name & "!blabla"
.PasteFace
End With
ActiveCell.Copy
Application.CutCopyMode = False

End Sub

--
Regards,
Tom Ogilvy


"Tom" wrote in message
...
Hi

I created an entry in the commandbar with a customized icon. The code is

the
following:

Sub Test()
Dim cbrMenuCtrl As CommandBarButton

Worksheets("Init").Shapes(1).Copy

Set cbrMenuCtrl = Application.CommandBars("Tools").Controls.Add
With cbrMenuCtrl
.Caption = "Hello"
.OnAction = ThisWorkbook.Name & "!blabla"
.PasteFace
End With

Application.CutCopyMode = False

End Sub


The problem is that the icon remains in the Excel memory. When I enter the
paste command the icon will be pasted?!? How to free the memory?

Tom





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
Colon at the end of excel file name(ex: problem.xls:1, problem.xls financeguy New Users to Excel 2 January 15th 10 01:15 AM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
problem with a conditional max problem Brian Cornejo Excel Discussion (Misc queries) 1 February 18th 05 06:25 PM


All times are GMT +1. The time now is 01:59 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"