Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Icon Sets - Display icon in one cell depending upon value in anoth Nolene Excel Worksheet Functions 2 February 26th 10 05:43 AM
excel keeps crashing when starting the program jblake48 Excel Discussion (Misc queries) 1 October 11th 06 05:19 PM
Starting another program out of Excel VB?? Mac Lingo Excel Worksheet Functions 1 June 16th 06 03:52 AM
Email Icon on excel 200 toolbar a vecin Excel Discussion (Misc queries) 1 April 27th 06 07:31 PM
Can I add equation editior to my toolbar in EXCel as an icon? happy Excel Worksheet Functions 1 October 16th 05 05:32 PM


All times are GMT +1. The time now is 06:18 AM.

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"