I've exported a recordset to Excel by code and then wish to view the spreadsheet and allow the user to edit the data. The spreadsheet is based on a template which has its worksheets protected (to prevent alterations )and then saved as another file. I use the following code to open the spreadsheet from Acess:
[Set objExcel = GetObject(STRFILENAME)
objExcel.Application.WORKSHEETS(1).Unprotect "password"
objExcel.Application.Visible = True]
All this is fine and the user can make changes, however when the user closes the spreadsheet and opens it at another time the sheet is automatically protected. Does unprotecting from access only work the once, how do i permanatley unprotect the spreadsheet (without telling the user the password!)
[Set objExcel = GetObject(STRFILENAME)
objExcel.Application.WORKSHEETS(1).Unprotect "password"
objExcel.Application.Visible = True]
All this is fine and the user can make changes, however when the user closes the spreadsheet and opens it at another time the sheet is automatically protected. Does unprotecting from access only work the once, how do i permanatley unprotect the spreadsheet (without telling the user the password!)