Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: custom toolbar buttons

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    I have a custom toolbar button that opens a userform

    Public Sub FormReturn27()

    Hide_All
    mfareaval = "27A"
    UnitFormS.Show

    End Sub


    whaere hide_all just hides all but 1 worksheet

    the problem is that I get this error:

    Adocument with the name "..." is already open, Your cannot open two document with the same name even if the documents are in different folders.

    as far as i can tell I m not trying to open anything... just show a form...

    any ideas?

    Ed

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm guessing this is a UserForm and that you have some code in the Initialize or the Activate event that has a line like:

    Workbooks.Open etc etc

    Even though the debugger is highlighting the .Show code line, the problem is really with your userform, not this line of code. It's sort of a quirk of the VBE debugger.

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I had a similar sounding problem after moving a workbook between drives. The custom toolbar had macros associated with various buttons, these had to be re-associated with the macros in the new workbook location, other wise I was given the same fault message as you are getting.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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