Results 1 to 10 of 10
  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 (2000 SR-1)

    I need to put license agreement Accept / Decline buttons on the first page of an Excel template. The Accept button will take the user to the first worksheet in the actual program. The Decline button will close the program. Problem is, I have no clue as to what to do with that first page after the user accepts the agreement. I don't want the user to have to see it again after he/she first accepts the license agreement. Since it won't be needed again in normal usage, do I code the Accept button to delete that worksheet, hide it, or what? What's the normal procedure?

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

    Re: License Agreement (2000 SR-1)

    Is this really an Excel template with a .xlt extension, or is it a .xls file that is being used as a template?
    Legare Coleman

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

    Re: License Agreement (2000 SR-1)

    It's an .xls file being used as a template.

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

    Re: License Agreement (2000 SR-1)

    Then in the code for the Accept button, you could hide the Sheet with the Agreement (make it xlVeryHidden), and then save the workbook.
    Legare Coleman

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

    Re: License Agreement (2000 SR-1)

    Whooops! While testing the code that sheet got very hidden. I haven't used this version of hidden before; how do I get it back?

  6. #6
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: License Agreement (2000 SR-1)

    Sheets("xxx").Visible = True
    where xxx is the sheet name
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

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

    Re: License Agreement (2000 SR-1)

    Thanks!

    Now I have a secondary problem. The macro on the Accept button for the license agreement is as follows:

    Worksheets(2).Visible = True
    Worksheets(3).Visible = True
    Worksheets(4).Visible = True
    Worksheets(1).Visible = False
    ActiveWorkbook.Save

    When one clicks the Accept button it makes the program visible to the user, and hides the license agreement. Problem is, the workbook is password protected, so I need to unprotect it first, then make the sheets visible, then reprotect it. What property of Excel does this, and how do I get the passwords in?

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

    Re: License Agreement (2000 SR-1)

    To unprotect:

    ActiveWorkbook.Unprotect Password:="Secret"

    To protect again:

    ActiveWorkbook.Protect Password:="Secret"

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

    Re: License Agreement (2000 SR-1)

    I'm getting a Run Time Error 1004 when I try that. However I tried it as
    ActiveWorkbook..Unprotect ("secret")

    That works. Thanks.

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

    Re: License Agreement (2000 SR-1)

    You probably had a typo somewhere (and .. cannot be right either) <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

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