I've used EnableAutoFilter in a spreadsheet produced from Progress 8, using the excel.application COM object, in order to allow users to filter columns in a spreadsheet with some protected columns. However, I have run into the problem that it needs to be re-applied every time the spreadsheet is opened.
I've found code that has to be inserted in the "this worksheet" module:
Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Unprotect Password:="pass"
ws.EnableAutoFilter = True
ws.Protect Password:="pass", userinterfaceonly:=True
Next ws
End Sub
How do I insert this from Progress while creating the spreadsheet?
I've found code that has to be inserted in the "this worksheet" module:
Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Unprotect Password:="pass"
ws.EnableAutoFilter = True
ws.Protect Password:="pass", userinterfaceonly:=True
Next ws
End Sub
How do I insert this from Progress while creating the spreadsheet?