View Single Post
  #1   Report Post  
Curt
 
Posts: n/a
Default Macros/Signatures Question

I have an Excel Workbook that I created for a PC Order Form. I set it up to
only make certain rows visible based on the Machine Model that they choose.
I digital signed the Worksheets and exported the Digital Signature
Certificate and installed it on the Users PCs. The code works great. The
user opens the Workbook and it runs the Macros with no problem. The problem
I have is when the user goes to save the Workbook. They get an error that
€śExcel can not sign VBA macros when saving to this file format. Do you want
to remove the digital signature and continue saving this workbook?€ť Then the
next time they open the Workbook the Macros do not work since we have Macro
Security set to high. Is it possible to sign a Workbook and have it keep the
signature after a save is performed? I do not want to have to change the
Users Macro Security Settings if possible.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range

If Range("B3").Value 0 Then
For Each c In Range("A7:A40")
If c.Value = 8 Then
Rows(c.Row).Hidden = False
End If
Next c
Else
For Each c In Range("A7:A40")
If c.Value = 8 Then
Rows(c.Row).Hidden = True
End If
Next c
End If

If Range("B4").Value 0 Then
For Each c In Range("A7:A40")
If c.Value = 5 Then
Rows(c.Row).Hidden = False
End If
Next c
Else
For Each c In Range("A7:A40")
If c.Value = 5 Then
Rows(c.Row).Hidden = True
End If
Next c
End If
End Sub

--
Thanks