Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
following is the code which creates toolbar buttons. I m using office xp 2003. When i start excel program, it doesnt display correct toolbar icon for which i hv given face-id. But when i move my mouse over the button, then it changes to the correct one. Code: -------------------- Sub CreateBar() Dim oBar As CommandBar Dim oKicker As CommandBarControl RemoveBar 'Prevents duplicate entry Set oBar = Application.CommandBars.Add(Name:="SKicker", Position:=1, Temporary:=True) oBar.Visible = True Set oKicker = oBar.Controls.Add(ID:=1, Befo=1) With oKicker .OnAction = "General.Show_SuperKicker" .FaceId = 9744 .Caption = "SUPERKICKER" End With Set oKicker = Nothing Set oBar = Nothing End Sub -------------------- I need to display correct toolbar-icon when excel program is started. Also some face-id doesnt work with office-2000-- why so?? It gives debug msg. -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=378265 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
some faceID's dont exist and will give a blank icon. the problem you're having with FaceID 9744.. it doesn't exist in xl2000! Highest faceID's (approx and from memory) xl97: 4000 xl2k: ???? xlXP: 7000 xl2003: 10500 -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam ilyaskazi wrote : following is the code which creates toolbar buttons. I m using office xp 2003. When i start excel program, it doesnt display correct toolbar icon for which i hv given face-id. But when i move my mouse over the button, then it changes to the correct one. Code: -------------------- Sub CreateBar() Dim oBar As CommandBar Dim oKicker As CommandBarControl RemoveBar 'Prevents duplicate entry Set oBar = Application.CommandBars.Add(Name:="SKicker", Position:=1, Temporary:=True) oBar.Visible = True Set oKicker = oBar.Controls.Add(ID:=1, Befo=1) With oKicker .OnAction = "General.Show_SuperKicker" .FaceId = 9744 .Caption = "SUPERKICKER" End With Set oKicker = Nothing Set oBar = Nothing End Sub -------------------- I need to display correct toolbar-icon when excel program is started. Also some face-id doesnt work with office-2000-- why so?? It gives debug msg. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
if it is existing then why it is not showing the correct face-id icon when excel program is loaded??? It changes to correct one, only if i move my mouse cursor over that button... is there any solution or alternate to this issue. -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=378265 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
read again: 9744 does NOT exist in xl97/xl2K/xlXP. it raises an error and (depending on errorhandlers) stops on the line where you assign faceid 9744 in xl2003 your code runs fine and shows the intended icon without fail... NO need to move a mouse. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam ilyaskazi wrote : if it is existing then why it is not showing the correct face-id icon when excel program is loaded??? It changes to correct one, only if i move my mouse cursor over that button... is there any solution or alternate to this issue. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
KeepITcool,
Please reread the OPs post. He *is* using XL2003 and he *has* the problem he describes. No face until the mouse is over the icon/button. Henry "keepITcool" wrote in message ft.com... read again: 9744 does NOT exist in xl97/xl2K/xlXP. it raises an error and (depending on errorhandlers) stops on the line where you assign faceid 9744 in xl2003 your code runs fine and shows the intended icon without fail... NO need to move a mouse. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam ilyaskazi wrote : if it is existing then why it is not showing the correct face-id icon when excel program is loaded??? It changes to correct one, only if i move my mouse cursor over that button... is there any solution or alternate to this issue. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
Henry..pls read the *last paragraph* in original post.
As stated I cannot replicate his problem in xl2003. But he indicates he IS coding for older versions. So it must be something else... maybe incorrect referencing of Office Library? -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Henry wrote : KeepITcool, Please reread the OPs post. He is using XL2003 and he has the problem he describes. No face until the mouse is over the icon/button. Henry "keepITcool" wrote in message ft.com... read again: 9744 does NOT exist in xl97/xl2K/xlXP. it raises an error and (depending on errorhandlers) stops on the line where you assign faceid 9744 in xl2003 your code runs fine and shows the intended icon without fail... NO need to move a mouse. -- keepITcool www.XLsupport.com | keepITcool chello nl | amsterdam ilyaskazi wrote : if it is existing then why it is not showing the correct face-id icon when excel program is loaded??? It changes to correct one, only if i move my mouse cursor over that button... is there any solution or alternate to this issue. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
I hv lot of toolbar items and want to group some of them. how is it possible through programatically?? -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=378265 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
a rough example:.. assumes commandbar "mybar" has been created with application.commandbars("mybar") 'create a popup (submenu) with .controls.add(Type:=msoControlPopup,temporary:=tru e) .Caption = "Menu A" for i=1 to 10 .controls.add(Type:=msoControlButton,temporary:=tr ue) .caption = "Button " & i next end with end with -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam ilyaskazi wrote : I hv lot of toolbar items and want to group some of them. how is it possible through programatically?? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
there is something expected= for i=1 to 10 ..controls.add(Type:=msoControlButton,temporary:=t rue) ..caption = "Button " & i next i m receiving compile error msg. help me with editing my above given original code and post here plz. -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=378265 |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
yep. typo. mea culpa:
For i = 1 To 10 With .Controls.Add(Type:=msoControlButton, temporary:=True) .Caption = "Button " & i End With Next -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam ilyaskazi wrote : there is something expected= for i=1 to 10 .controls.add(Type:=msoControlButton,temporary:=tr ue) .caption = "Button " & i next i m receiving compile error msg. help me with editing my above given original code and post here plz. |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
display correct toolbar icon on starting excel application program
how 2 put seprators actually?? i need.. also between your group items -- ilyaskaz ----------------------------------------------------------------------- ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396 View this thread: http://www.excelforum.com/showthread.php?threadid=37826 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Icon Sets - Display icon in one cell depending upon value in anoth | Excel Worksheet Functions | |||
excel keeps crashing when starting the program | Excel Discussion (Misc queries) | |||
Starting another program out of Excel VB?? | Excel Worksheet Functions | |||
Email Icon on excel 200 toolbar | Excel Discussion (Misc queries) | |||
Can I add equation editior to my toolbar in EXCel as an icon? | Excel Worksheet Functions |