My code has suddenly stopped working. I am getting compile error when I run this macro Image 1
. the combobox1 object definitely exists Image 2 
I really cannot think what has changed for it to fail and have not tried any other code. I have seen a similar problem on membership classes but cannot transpose onto this.
The code
Public Sub List()
Dim rs1 As Object
Set rs1 = CreateObject("ADODB.Recordset") ' this is the Selection Record Set for Combobox1, which is on Sheet 1
Dim sqlstrSel As String
sqlstrSel = " select * from [30List]"
'Debug.Print sqlstrSel
Call connectDatabase ' populates Combobox with Selid and Selname
rs1.Open sqlstrSel, DBCONT
Sheet1.ComboBox1.Clear
Sheet1.ComboBox1.AddItem "------1. Select Project"
If rs1.RecordCount > 0 Then
For i = 1 To rs1.RecordCount
Sheet1.ComboBox1.AddItem rs1(0) & " - " & rs1(1) & " - " & rs1(2) & " - " & rs1(3) & " - " & rs1(4) & " - " & rs1(5)
rs1.movenext
Next i
Else
MsgBox "FFS"
End If
Sheet1.ComboBox1.Text = Sheet1.ComboBox1.List(0)
End Sub
Dim obj As Object: For Each obj In Sheet1.OLEObjects: Debug.Print obj.Name: Next objSheet1or onSheet1.ComboBox1would be more useful that a screenshot; an incomplete screenshot at that.Sheet1(maybe as a Global of typeWorksheet) somewhere in that same project? That would "shadow" the worksheet codename and cause the compile error you're seeing.