Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Apr 2004
    Location
    Jacksonville, Florida, USA
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    License Agreement (Excel 2000 SR1)

    I'm trying to make a license agreement that comes up when a user opens a workbook for the first time. At the time the file initially comes up the only worksheet unhidden is the license agreement, which has two buttons on it, ACCEPT and DECLINE. If the DECLINE button is pressed the workbook closes. If the ACCEPT button is pressed, several things happen. The rest of the workbook is unhidden, the license agreement is hidden, then the user is prompted to save the workbook wherever they want, under whatever name they want. The next time the user opens the workbook they are able to access everything except the license agreement which remains hidden forever.

    I'm using the following code on the ACCEPT button:

    ActiveWorkbook.Unprotect ("password")
    Worksheets(2).Visible = True
    Worksheets(3).Visible = True
    Worksheets(4).Visible = True
    Worksheets(1).Visible = False
    ActiveWorkbook.Protect ("password")
    fname = Application.GetSaveAsFilename
    ActiveWorkbook.SaveAs fname

    When I test this on my machine it works nicely, but I had somebody else test it from a CD and he tells me nothing happened when he pressed the ACCEPT button. The DECLINE button worked on his machine. I think he uses Excel 98, and I realize that he should get an error message regarding converting to that format or keeping the Excel 2000 format, but otherwise I have no idea why it wouldn't work on his machine. Also, is there a way to bypass the conversion message and have the file automatically convert? I don't believe I lose any functionality from one version to the next.

    I'm open for all suggestions/corrections etc.

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

    Re: License Agreement (Excel 2000 SR1)

    If the Decline button works, the Accept button should do something, even if only displaying an error message, unless Excel VBA behaves completely differently on the Macintosh. Perhaps someone with a Mac can comment.

  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: License Agreement (Excel 2000 SR1)

    Hi merlynsdad,

    You may be able to eliminate the conversion message by saving the file in an earlier Exel format (V5, or later).

    Potential issues I can se with running the macro from a CD are:
    . the file on CD will have the read-only attibute set, preventing any attempt to overwrite it, even if it has been copied to a hard drive; and
    . the save is liable to fail even if the user tries to save the file to the CD with a different name.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #4
    2 Star Lounger
    Join Date
    Apr 2004
    Location
    Jacksonville, Florida, USA
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: License Agreement (Excel 2000 SR1)

    It's distributed on CD, but it only gets loaded the first time from the CD; after that the user runs it from their hard drive. I just tested that: loaded it on the CD, ran the macro and saved it to the desktop, then brought it back up from there. It runs normally that way.

Posting Permissions

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