Hi all I have the following code to link 3 comboboxes (active x controls):
Private Sub Area_Change()
If ActiveSheet.OLEObjects("Area").Object.Text <> "None" Then
ActiveSheet.OLEObjects("Country").Object.Text = "None"
ActiveSheet.OLEObjects("Textbox1").Object.Text = ""
Range("I16").Value = ""
End If
End Sub
Private Sub Country_Change()
If ActiveSheet.OLEObjects("Country").Object.Text <> "None" Then
ActiveSheet.OLEObjects("Area").Object.Text = "None"
ActiveSheet.OLEObjects("Textbox1").Object.Text = ""
Range("I16").Value = ""
End If
End Sub
Private Sub TextBox1_Change()
If ActiveSheet.OLEObjects("Textbox1").Object.Text <> "" Then
ActiveSheet.OLEObjects("Country").Object.Text = "None"
ActiveSheet.OLEObjects("Area").Object.Text = "None"
Range("I16").Value = ActiveSheet.OLEObjects("Textbox1").Object.Text
End If
End Sub
However when I close the work book I get 2 runtime errors in succcession. The lines affected are:
If ActiveSheet.OLEObjects("Country").Object.Text <> "None" Then
and
If ActiveSheet.OLEObjects("Area").Object.Text <> "None" Then
Any help in rosolving this would be greatly appreciated as it'd driving me mad!
Thanks,
james
Bookmarks