+ Reply to Thread
Results 1 to 5 of 5

Macro button on one sheet only

  1. #1
    Nleric
    Guest

    Macro button on one sheet only

    Hi,
    when I create a button and place it on the toolbar and then assign a macro
    to it, is it possible to have that button display on the toolbar in the one
    sheet it was intended for only and no other sheet?
    Thanks,
    Noel

  2. #2
    Andibevan
    Guest

    Re: Macro button on one sheet only

    Wouldn't it be easier to insert a row at the top of your sheet, put the
    macro button on this row and then freeze the pane?

    "Nleric" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    when I create a button and place it on the toolbar and then assign a macro
    to it, is it possible to have that button display on the toolbar in the one
    sheet it was intended for only and no other sheet?
    Thanks,
    Noel



  3. #3
    Don Guillett
    Guest

    Re: Macro button on one sheet only

    Why not just put the button on the sheet??

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Nleric" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > when I create a button and place it on the toolbar and then assign a macro
    > to it, is it possible to have that button display on the toolbar in the

    one
    > sheet it was intended for only and no other sheet?
    > Thanks,
    > Noel




  4. #4
    Andibevan
    Guest

    Re: Macro button on one sheet only

    Alternatively you could use something like the following:-

    First Create a toolbar called MyMacros, then assign your button to that
    toolbar, Then lets say that the sheet you want the toolbar to display when
    activated is called mymacros_sheet.

    Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    If Sh.name = "MyMacros_Sheet" Then
    Application.CommandBars("MyMacros").Visible = True
    Else
    Application.CommandBars("MyMacros").Visible = False
    End If
    End Sub

    HTH

    Andi

    "Don Guillett" <[email protected]> wrote in message
    news:[email protected]...
    Why not just put the button on the sheet??

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Nleric" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > when I create a button and place it on the toolbar and then assign a macro
    > to it, is it possible to have that button display on the toolbar in the

    one
    > sheet it was intended for only and no other sheet?
    > Thanks,
    > Noel





  5. #5
    Nleric
    Guest

    Re: Macro button on one sheet only

    Thanks for the replies, I am new to this and was having a Homer Simpson
    moment :-)))
    Noel

    "Andibevan" wrote:

    > Alternatively you could use something like the following:-
    >
    > First Create a toolbar called MyMacros, then assign your button to that
    > toolbar, Then lets say that the sheet you want the toolbar to display when
    > activated is called mymacros_sheet.
    >
    > Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    > If Sh.name = "MyMacros_Sheet" Then
    > Application.CommandBars("MyMacros").Visible = True
    > Else
    > Application.CommandBars("MyMacros").Visible = False
    > End If
    > End Sub
    >
    > HTH
    >
    > Andi
    >
    > "Don Guillett" <[email protected]> wrote in message
    > news:[email protected]...
    > Why not just put the button on the sheet??
    >
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "Nleric" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > > when I create a button and place it on the toolbar and then assign a macro
    > > to it, is it possible to have that button display on the toolbar in the

    > one
    > > sheet it was intended for only and no other sheet?
    > > Thanks,
    > > Noel

    >
    >
    >
    >


+ 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