I was going to develop a UserForm but decided that just adding a ListBox to the Worksheet would be simpler. I have a decent reference book to help me but I'm finding it is a bit outdated. I've placed my code below. The first line does not allow me to go into Break Mode. So I can only debug by running the whole thing. I'm getting an error but because I'm not in Break Mode, it does not highlight the offending line.
Error Message: Run-time error '438': Object doesn't support this property or method
If anyone has a clue as to which line might be the offending one, please help!!
Error Message: Run-time error '438': Object doesn't support this property or method
Code:
Dim PrinterList$
Sub lbPrintersPopulate()
ActiveSheet.OLEObjects.Add ClassType:="Forms.ListBox.1", Left:=47.25, Top:=43.5, Width:=68.25, Height:=15
ActiveSheet.ListBox1.Name = "PrinterList"
ActiveSheet.PrinterList.ColumnCount = 4
ActiveSheet.PrinterList.Clear
ActiveSheet.PrinterList.Object.ListFillRange = Worksheets("ListOfPrinters").Name.Range("A1:A4")
End Sub
If anyone has a clue as to which line might be the offending one, please help!!