Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Jan 2004
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autorun xls (2000)

    Hi all,

    I want to create a CD which automatically opens an xls file and runs the code in the Open event. We have created an .inf file, but the results vary depending on the version of Windows we use:
    NT and Win98 - the file does not open. All that happens is that an explorer window opens automatically
    Win2K and WinXP - the xls opens, but it prompts as to whether or not the code should be disabled.

    I need the xls to open and the code to run without message boxes or prompts no matter which version of Windows I am using. Can anyone help?

    Thanks
    JB

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Autorun xls (2000)

    I see 2 questions here:
    1) running an XL file with autorun. I don't know much about autorunning CDs. I have only done a little with powerpoint slides. My impression is that need a "viewer file" installed on the CD. This generally works for ppt since you want to see the slide show but are not going to edit and work with the file.

    I think there is an excel viewer from microsoft that is freely distributable, but it only allows viewing the spreadsheet, it does not open excel.

    It might be possible to have autorun look for and find the excel.exe file, but this is outside the scope of excel, it seems to be more a batch file issue. Maybe someone else on this board has more experience.

    2) the second question seems to involve the "macros disabled" dialog. Only the user can set his "protection" to such a level to ignore these messages. You can not put code in a workbook to "bypass" the macro warning. Anyone is free to disable your macros who opens the file. The most you can do is to try to make it as "unusable" as possible if the macros are disabled. Note however that most excel protections barely protect from "inadvertent errors from novices" let alone someone who wants to get around them.

    Steve

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Autorun xls (2000)

    Hi JB,

    It may be that the autorun function has been disabled on the NT and Win98 PCs. There are two ways this might be done:
    . by changing the drive's settings; or
    . by changing registry settings.

    To check the drive's settings
    Right-click on
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #4
    New Lounger
    Join Date
    Jan 2004
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autorun xls (2000)

    re: checking the user's pc's - I cant do this as I dont have access to them. This CD is going to be posted to several people so I cant check their registry settings etc. The fix needs to be in the autorun.....

    This is definitely something that needs to be done in the autorun of the CD, not in excel. However, I dont know how to do this. This post may be in the wrong area, but there didnt seem to be an area on the forum which was not Windows specific so I thought someone here might know...

    Thanks
    JB

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Autorun xls (2000)

    But if a user has autorun disabled for CDs, it doesn't matter what you do with autorun, it won't run.

    Also the macros enable dialog (if it is an issue) is also up to the user to set and to pick.

    Is the issue the autorun of the CD or the macro enable button or both?

    Does the autorun work in the various windows versions after you ensure that autorun is enabled on those computers.

    Steve

  6. #6
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autorun xls (2000)

    For question 2, the only way to avoid the message 'disable/enable macros' is to attach a digital certificate to the Excel file. This only works for Excel 2000 and above. There is still one gotcha and that is the very first time the user loads the workbook. I believe Excel will still prompt them to enable/disable macros the very first time AND it'll also ask if they want to 'trust' all future workbooks signed by the certificate used in this particulalr workbook. If they select 'yes' to 'trust' then they won't be nagged next time any workbook with this same cert is loaded.

    As others have said, this message is a security warning and it's already pretty bad about how easy it is to get viruses with VBA, if code could disable this message too, it'd be even worse than it already is.

    Deb <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  7. #7
    New Lounger
    Join Date
    Jan 2004
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autorun xls (2000)

    Thanks everyone. I wasnt that worried about the disable macros message, but I was worried about the CD not opening the xls. I've now created an exe which opens the xls, and this seems to work much better.

    Thanks for all your help
    JB

Posting Permissions

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