Does anyone have a question why this would be erroring at this point;
"im lt As LayerTable = tm.GetObject(db.LayerTableId, OpenMode.ForWrite, True)"
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim tm As DBTransMan = db.TransactionManager
'start a transaction
Dim myT As Transaction = tm.StartTransaction()
Dim ltr As LayerTableRecord = New LayerTableRecord
ltr.Name = namLay
Dim myColor As New Color()
myColor.ColorIndex() = colLay
ltr.Color() = myColor
If Linetype <> "Continuous" Then ltr.LinetypeObjectId = CheckForLineType(Linetype)
MsgBox("5")
Dim lt As LayerTable = tm.GetObject(db.LayerTableId, OpenMode.ForWrite, True)
lt.Add(ltr)
tm.AddNewlyCreatedDBObject(ltr, True)
ltr.Description = Descrip
myT.Commit()
tm.Dispose()