Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Faulty Macro? (Excel 2002 NL)

    Goodmorning,

    The following occurs:
    One of my colleagues has an excel sheet in which he saved a macro to print a selection:
    Sub PrintSelectie()
    '
    ' PrintSelectie Macro
    ' De macro is opgenomen op 1/03/2004 door localuser.
    '
    '
    Selection.PrintOut Copies:=1, Collate:=True
    End Sub

    But... when he tries to start this macro by clicking the button which represents this macro he gets a message:
    A document called Persnl.xls is already opened. You cannot open two documents with the same name, even thought de documents are placed in different folders.
    If you want to open the second document, close the document that is momentarely opened or change the name of one of the documents.

    When I open this document and open another one an try to use the same macro, everything works out fine...
    Can anybody tell me why this happens?

    Many thanks in advance!

    Greetz,
    Daphne <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Hello Daphne,

    I suspect that either the user has named a "standard" workbook Personal.xls (Persnlk.xls in Dutch), or a macro in the wrong workbook has been assigned to the button you mention. The name Personal.xls (Persnlk.xls) is reserved for the user's personal macro workbook in the XLSTART folder; this name should not be used for other workbooks.

    If the problem is not in the use of the name Personal.xls, let the user try the following:
    - Start Excel.
    - Select Tools | Customize... (Extra | Aanpassen...)
    - Right-click the button.
    - From the popup menu, select Assign Macro... (Macro toewijzen...)
    You should be able to see in which workbook the assigned macro is stored.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Goodmorning,

    I finally got a chance to visit the user's office (while he was in that is! <img src=/S/tongue.gif border=0 alt=tongue width=15 height=15>).
    I've checked the things you've suggested, and these were all right. The concerning macro was assigned to pernslk.xls which has been placed in documentsandsettingsusernameblabla...

    Do you have any other suggestions?

    Many thanks in advance!

    Daphne

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Daphne,

    Does the user have "Ignore other applications" ("Andere toepassingen negeren") checked in the General tab of Tools | Options...? If so, let him uncheck it.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Hans,

    No, he didn't have this option checked...... bummer!!!

    Greetz,
    Daphne

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Daphne,

    The only other suggestion I have is to work through the steps in Jan Karel Pieterse's <!post=Systematic Approach to Behavioral Problems in XL,290455>Systematic Approach to Behavioral Problems in XL<!/post>.

  7. #7
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Hans,

    Thanks, I've a lot of reading to do I see! <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

    Many thanks again, if I find the solution, I'll let you know!

    Bye bye,
    Daphne

  8. #8
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    In your first post you referred to Persnl.xls. Was this meant to be Persnlk.xls ?

    It is possible that two workbooks with the name Persnlk.xls exist in two different folders. If your user has assigned a button to the macro, right click on the button and select Assign Macro. Check the currently assisgned macro taking note of the full path to the containing workbook. Then check to see if that path agrees with the path for the loaded but hidden Persnlk.xls.

    Andrew C

  9. #9
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    This definitely sounds like there are two files named Persnlk.xls in two different directories. One of them would be in a directory where it is getting opened automatically when Excel starts. The other one is in another directory and is the one that contains the macro. There are several things that you should try:

    1- Select Options from the Tools menu. Click on the General Tab (Excel 2000, might be different in 2002). Look for the box labeled "Alternate startup file location." If that box contains a path to a directory, look in that directory to see if it contains a file named Persnlk.xls. If it does, that is the Persnlk.xls that is being opened automatically when Excel starts.

    2- Search the hard disk for a directory named XLSTART. Look in all that you find for a file named Persnlk.xls. If you find one, then that is probably the one being opened automatically.

    3- Search the entire hard disk for files named Persnlk.xls. If you find more than one, then that is the problem.
    Legare Coleman

  10. #10
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Goodmorning,

    I did find two persnlk.xls files.
    How can I change the path to this persnlk.xls? I don't want my user to save his 'homemade' macro's on C: for obvious reasons. When he wants to work on another pc he won't have his macro's.
    I've tried to fill the path in the option 'Start all files in' (Tools, Options, tab General), but then I get the errorwindow that it already has been started. And when I check th

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    The "good" path for Persnlk.xls is Cocuments and Settings<username>Application DataMicrosoftExcelXLSTART. This is in the profile of the user, so if you have roaming profiles on the network, it will probably travel to another PC. Otherwise, the macros should *not* be put in Personal.xls, but in a file on the network with a different name. Set the "At startup, open all files in" path in Tools | Options... to the folder containing this file. The folder should not contain other files unless you want Excel to try to open them too.

  12. #12
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Goodmorning,

    I already found my own stupid mistake... I forgot to put the last folder in the open in path...
    So everything's working like it should now!
    Many thanks all for your help and explanations!

    Have a nice day!
    Daphne <img src=/S/compute.gif border=0 alt=compute width=40 height=20>

  13. #13
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Good morning Hans,

    I've changed the path to another network location than Cocuments etc. This seemed to be working okay. But now this colleague calls me and shows me that he has the same problem again. When I check the c:documents etc path... the persnlk.xls is back? And that while I've moved it to another location?
    Do you have any idea why this happened?

    many thanks!
    Daphne

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    The problem is that the path of the macro assigned to a custom toolbar button is hard coded. So the button still searches for the macro in Cocuments and Settings... This may cause Excel to create a new Persnlk.xls there. You (or your colleague) can avoid this as follows:

    - Remove the "new" Persnlk.xls from Cocuments and Settings...
    - Start Excel.
    - Select Tools | Customize... (Extra | Aanpassen...)
    - Right click a custom toolbar button, and select Assign Macro... (Macro toewijzen...)
    - Assign the correct macro from Persnlk.xls.
    - Click OK.
    - Repeat for each other custom toolbar button.
    - Close the Customize dialog when you're done.

    If your colleague has a large number of custom toolbar buttons, a macro to change the path would be easier. Post back if you need that.

  15. #15
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faulty Macro? (Excel 2002 NL)

    Snif.... I already did this... but it keeps coming back... Could this still be because of the roaming profiles?

    Thanks,
    Daphne

Page 1 of 2 12 LastLast

Posting Permissions

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