Consulting

Results 1 to 7 of 7

Thread: Solved: Problem with amended xld.sheetmanager code

  1. #1
    VBAX Regular
    Joined
    Oct 2008
    Posts
    26
    Location

    Solved: Problem with amended xld.sheetmanager code

    I've downloaded the xld.sheetmanager and it is an excellent utility.
    Iv've tried customizing the code The problem I have now is the following:
    I've tried to change the menu names in the .ply module and now I permanently have four hide/unhide names (old and new) when I right click on the sheet tabs. This also appears in other workbooks that does not have the code.

    Any ideas how to fix?
    Last edited by louww; 06-13-2010 at 02:04 PM.

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,058
    Location
    Perhaps if you just move your head a little to the right we can then all read the code that you have "modified"

    A little far fetched perhaps, but how do you expect us to assist you if we cannot view your amendments?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    The menu options will always be there as long as the code workbook is open .

    Which bits of the code did you change?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Thinking about it, you probably renamed the controls after the old name had been created, and the delet then deletes the new name.

    In the VBIDE immediate window, enter

    application.CommandBars("Ply").controls("Hide Sheet(s)")

    and

    application.CommandBars("Ply").controls("Unhide Sheet(s)")
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Regular
    Joined
    Oct 2008
    Posts
    26
    Location

    xld.sheet manager problem

    The changes I made are listed below.
    All I wanted to do is change the names in the tab menu, and now I have the new and old names in the relevant workbook and all other workbooks (even if the original is closed).
    MenuRemovePly

    [VBA]With Application.CommandBars("Ply")
    .Controls.Add(Type:=msoControlButton).Caption = _
    "Hide Check List(s)"
    .Controls.Add(Type:=msoControlButton).Caption = _
    "Unhide Check List(s)..."
    .Controls("Hide Check List(s)").BeginGroup = True
    .Controls("Hide Check List(s)").OnAction = "HideSheet"
    .Controls("Unhide Check List(s)...").OnAction = "UnhideSheet"
    End With
    End Sub

    '-------------------------------------------------
    ' Function: Removes the two items from the Ply
    ' menu
    '-------------------------------------------------
    Public Sub MenuRemovePly()
    On Error Resume Next
    With Application.CommandBars("Ply")
    .Controls("Hide Check List(s)").Delete
    .Controls("Unhide Check List(s)").Delete
    End With
    On Error GoTo 0
    End Sub[/VBA]

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Did you try what I suggested in my follow-up post? Your response suggests that I correctly predicted the problem.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    VBAX Regular
    Joined
    Oct 2008
    Posts
    26
    Location

    solved: xld.sheet manager problem

    Works perfectly, thanks!

Posting Permissions

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