Results 1 to 4 of 4

Code to Protect Sheet Allowing Format Rows & Edit Objects

Threaded View

  1. #1
    Registered User
    Join Date
    11-15-2009
    Location
    Palmer, Alaska
    MS-Off Ver
    Excel 2010
    Posts
    69

    Code to Protect Sheet Allowing Format Rows & Edit Objects

    When my form protects my spreadsheet after hitting the command button, it doesn't keep my protection settings. I need to allow users to format rows and edit objects. I searched online came up with adding to the last line below, but it isn't working. Please help!



    Private Sub UpdateRatesCommandButton_Click()
    Sheets("TA Form").Unprotect Password:="XXXX"
    Worksheets("TA Form").Range("AV267").Value = AutomobileTextBox.Text
    Worksheets("TA Form").Range("AV268").Value = AircraftTextBox.Text
    Worksheets("TA Form").Range("AV269").Value = MovesTextBox.Text
    Worksheets("TA Form").Range("AV270").Value = AllOthersTextBox.Text
    Unload VehicleRatesUserForm
    Sheets("TA Form").Protect Password:="XXXX", AllowEditObjects:=True, FormattingRows:=True
    End Sub
    Last edited by Kristine T.; 11-15-2009 at 08:44 PM.

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