LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Add standard button on custum commandbar

Thanks for your help Bob!

Jos

"Bob Phillips" schreef in bericht
...
Jos,

I think that, rather than call the builtin control directly, you would
have
to have a button that unprotects the sheet, insert the comment via code,
then protect the sheet.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jos Vens" wrote in message
...
Thanks Bob,

it works, but not on my protected sheet (the cell is editable, but the
commandbutton stays grey). I cannot unprotect the sheet because users
will
delete my formula's. It's the button to edit/create comment on a cell.

Can you still help?
Thanks
Jos Vens


"Bob Phillips" schreef in bericht
...
Jos,

You set the ID to the BuiltinId for that control

Set cbCtl = CB.Controls.Add(Type:=msoControlButton, _
ID:=BuiltinId, _
Temporary:=True)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jos Vens" wrote in message
...
Hi,

I created a commandbar for my application. Adding a custom button
works
with
this procedure, but I want ot add a standard button of excel. How can
I
do
this?

Thanks a lot
Jos Vens

CB_LibraAdd "Maak/Bewerk Opmerking", "TB_CommentCreate", 1589, True

In this line, I want to have the original excel button for editing
comments
in stead of my procedure TB_CommentCreate. FaceID is correct.

Function CB_LibraAdd(vTooltipText As String, vOnAction As String,

vFaceId
As
Long, vGroup As Boolean)

Dim cbLibra As CommandBar
Dim vControl As CommandBarControl

On Error Resume Next

Set cbLibra = CommandBars("Libra")

Set vControl = cbLibra.Controls.Add

vControl.TooltipText = vTooltipText
vControl.OnAction = vOnAction
vControl.FaceId = vFaceId
vControl.Style = msoButtonIcon
vControl.BeginGroup = vGroup

End Function












 
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
event with commandbar button right-click? RB Smissaert Excel Programming 6 October 13th 05 01:59 PM
Creating a Custom commandbar button sifar Excel Programming 0 September 15th 05 11:27 PM
Dynamic commandbar button problem JB2005 Excel Programming 2 August 28th 05 10:09 AM
static commandbar Button Hari Excel Programming 0 June 22nd 04 10:50 AM
Commandbar button running macro Kwan Kim Chuen Excel Programming 0 July 27th 03 11:51 AM


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