+ Reply to Thread
Results 1 to 11 of 11

display correct toolbar icon on starting excel application program

  1. #1
    Forum Contributor
    Join Date
    06-02-2005
    Location
    India
    MS-Off Ver
    2007
    Posts
    138

    Question 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.


    Please Login or Register  to view this content.
    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.

  2. #2
    keepITcool
    Guest

    Re: 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, Before:=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. #3
    Forum Contributor
    Join Date
    06-02-2005
    Location
    India
    MS-Off Ver
    2007
    Posts
    138

    Question

    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.

  4. #4
    keepITcool
    Guest

    Re: 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. #5
    Henry
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >
    > 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. #6
    keepITcool
    Guest

    Re: 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" <[email protected]> wrote in message
    > news:[email protected]...
    > >
    > > 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. #7
    Forum Contributor
    Join Date
    06-02-2005
    Location
    India
    MS-Off Ver
    2007
    Posts
    138

    Question

    I hv lot of toolbar items and want to group some of them.

    how is it possible through programatically??

  8. #8
    keepITcool
    Guest

    Re: 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:=true)
    .Caption = "Menu A"
    for i=1 to 10
    .controls.add(Type:=msoControlButton,temporary:=true)
    .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. #9
    Forum Contributor
    Join Date
    06-02-2005
    Location
    India
    MS-Off Ver
    2007
    Posts
    138

    Exclamation compile error

    there is something expected=

    for i=1 to 10
    .controls.add(Type:=msoControlButton,temporary:=true)
    .caption = "Button " & i
    next

    i m receiving compile error msg.

    help me with editing my above given original code and post here plz.
    Last edited by ilyaskazi; 06-15-2005 at 07:17 AM.

  10. #10
    keepITcool
    Guest

    Re: 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:=true)
    > .caption = "Button " & i
    > next
    >
    > i m receiving compile error msg.
    >
    > help me with editing my above given original code and post here plz.


  11. #11
    Forum Contributor
    Join Date
    06-02-2005
    Location
    India
    MS-Off Ver
    2007
    Posts
    138

    seprators??

    how 2 put seprators actually?? i need..

    also between your group items.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1