I'm nearing completion on a custom excel workbook. I'm having a irritating issue where the below code works but gives a compile error on load. I've tried searching for the solution but being so new to VBA I'm not even sure what could be causing the issue. It highlights listbox1 but I have listbox1 in the sheet noted.
(Compile Error "Method or Data member not found")
Private Sub ListBox1_Click()
Sheet2.TextBox1.Value = " "
Dim i As Long
i = Sheet2.ListBox1.ListIndex
If i < -1 Then Exit Sub
Sheet2.TextBox1.Value = Sheet1.Range("C" & (i + 4))
End Sub
Thank You