slondon
05-29-2006, 01:16 PM
When a user selects "Save As" in my workbook, the "Change" event on combo boxes in the workbook seems to be triggered. This does not happen when "Save" is used.
Has anyone ever seen this before? Is there a way to prevent it?
Here is an example of the code behind one of my combo boxes. This workbook contains several similar objects for which this "Save As" problem occurs. In this example, when Save As is selected, Cell J20 reverts to the value in E20. I don't want this to happen. Any thoughts on how to prevent this would be much appreciated.
Private Sub TreatedPatientsOverride_Change()
Worksheets("Patient Population").Range("J20").Value = Worksheets("Patient Population").Range("E20").Value
If TreatedPatientsOverride.Value = Worksheets("Patient Population Worksheet").Range("D51").Value Then
TreatedPatientsBox.Visible = True
Else
TreatedPatientsBox.Visible = False
End If
End Sub
Has anyone ever seen this before? Is there a way to prevent it?
Here is an example of the code behind one of my combo boxes. This workbook contains several similar objects for which this "Save As" problem occurs. In this example, when Save As is selected, Cell J20 reverts to the value in E20. I don't want this to happen. Any thoughts on how to prevent this would be much appreciated.
Private Sub TreatedPatientsOverride_Change()
Worksheets("Patient Population").Range("J20").Value = Worksheets("Patient Population").Range("E20").Value
If TreatedPatientsOverride.Value = Worksheets("Patient Population Worksheet").Range("D51").Value Then
TreatedPatientsBox.Visible = True
Else
TreatedPatientsBox.Visible = False
End If
End Sub