Results 1 to 7 of 7

Make a created file protected by password

Threaded View

  1. #1
    Registered User
    Join Date
    01-01-2020
    Location
    Montana, USA
    MS-Off Ver
    365
    Posts
    19

    Lightbulb Make a created file protected by password

    I have searched many forums and have tried many things that I have found but am having no luck. I know that it will likely be something very simple but I cannot figure it out. Would someone please help me adjust the following code, to save the files that are being created as protected files (may be opened and viewed but not edited)? If a message is necessary if someone tries to change values, I would want the message to say only 'changes cannot be made without the appropriate password'. Everything else in my coding works perfectly, would someone please help me?

    
     For r = FirstRow To sws.Cells(sws.Rows.Count, "A").End(xlUp).Row
            sws.Rows(r).Copy dfCell
            dName = CStr(sws.Cells(r, "A").Value) & NAME_DELIMITER _
                & CStr(sws.Cells(r, "B").Value)
            If Len(dName) > ndLen Then
                dws.Name = dName
                dFilePath = dFolderPath & dName & ".xlsx"
                Application.DisplayAlerts = False
                    dwb.SaveAs dFilePath, xlOpenXMLWorkbook
                Application.DisplayAlerts = True
                dCount = dCount + 1
            End If
    I appreciate all of the help that the folks on this site give me and will appreciate any help that be given this time as well. Thank you!Forum Sample.xlsm
    Last edited by KristenBCK; 10-02-2023 at 10:02 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Make Access database file password protected or read-only
    By eeacolyte in forum Access Tables & Databases
    Replies: 7
    Last Post: 11-17-2017, 03:19 PM
  2. Replies: 0
    Last Post: 08-29-2013, 09:15 AM
  3. Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  6. Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. Replies: 0
    Last Post: 06-23-2005, 07:05 PM

Tags for this Thread

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