+ Reply to Thread
Results 1 to 2 of 2

Password\Backup

  1. #1
    scott
    Guest

    Password\Backup

    I have two questions. In my workbook I have multiple sheets. I have one for
    every day of the month. These need to be passworded. Is there away to apply a
    password to just these sheets at one time instead of doing them one at a
    time.I have a total of 45 sheets in workbook the other sheets I do not need
    to password and some can not be passworded. I am not that familiar with VB.
    My second question is there away to automatically back up this work book
    automatically with an add on. I have tried Microsofts auto backup\save and
    went and got the fix for it but it still does not work. It defaults back to
    10 minutes and always ask before back up and saving.
    thanks in advanace
    Scott

  2. #2
    Art Farrell
    Guest

    Re: Password\Backup

    Hi Scott,

    Here is one way by looping through the sheets. I don't know how your sheet
    names are set up but I'm assuming name of month and day - change to suit. If
    you just want to protect the sheets without a password delete the last part
    of that statement. I also show an unprotect macro in case you want to do
    them all at once. You could install one or two buttons on a sheet to call
    the macros:

    Dim n As Long
    Sub Prot()
    n = 1
    Do
    On Error Resume Next
    Sheets("May" & n).Activate
    Sheets("May" & n).Protect password:="jones"
    n = n + 1
    Loop Until n = 31
    End Sub

    Sub UnProt()
    n = 1
    Do
    On Error Resume Next
    Sheets("May" & n).Activate
    Sheets("May" & n).Unprotect password:="jones"
    n = n + 1
    Loop Until n = 31
    End Sub

    To save the Workbook copy the following macro in the VBE to the
    "ThisWorkbook" sheet. Change the path to suit your workbook This will do the
    automatic save:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.DisplayAlerts = False
    Me.Save
    Me.SaveAs Filename:="C:\aaab\NGassists\MnthS_U.xls"
    Application.DisplayAlerts = True
    End Sub

    CHORDially,
    Art Farrell


    "scott" <[email protected]> wrote in message
    news:[email protected]...
    > I have two questions. In my workbook I have multiple sheets. I have one

    for
    > every day of the month. These need to be passworded. Is there away to

    apply a
    > password to just these sheets at one time instead of doing them one at a
    > time.I have a total of 45 sheets in workbook the other sheets I do not

    need
    > to password and some can not be passworded. I am not that familiar with

    VB.
    > My second question is there away to automatically back up this work book
    > automatically with an add on. I have tried Microsofts auto backup\save and
    > went and got the fix for it but it still does not work. It defaults back

    to
    > 10 minutes and always ask before back up and saving.
    > thanks in advanace
    > Scott




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1