Here is my Block adder it uses the error code from layer not found traps the error and then adds the layer before continuing. Using Error Handlers is always a good idea even if it only has a case else that gives a msgbox or debug.print.
Public Function AddBlocks(varInsPnt As Variant, strLayerName As String, _
strBlock As String, Optional strAttValue As String = "") As String
Dim objBlkRef As AcadBlockReference
Dim objAttRef As AcadAttributeReference
Dim intLoop As Integer
Dim varAtts As Variant
Dim strHandle As String
On Error GoTo Err_Control
Set objBlkRef = ThisDrawing.ModelSpace.InsertBlock(varInsPnt, strBlock, 1, 1, 1, 0)
strHandle = objBlkRef.Handle
objBlkRef.Layer = strLayerName
If strAttValue <> "" Then
If objBlkRef.HasAttributes Then
varAtts = objBlkRef.GetAttributes
For intLoop = LBound(varAtts) To UBound(varAtts)
Set objAttRef = varAtts(intLoop)
objAttRef.TextString = strAttValue
Next intLoop
End If
End If
Autocad.Update
Exit_Here:
AddBlocks = strHandle
Exit Function
Err_Control:
Select Case Err.Number
Case -2145386476 'Layer Name not Found
Err.Clear
'Skip Layer Change or Create Layer
ThisDrawing.Layers.Add (strLayerName)
Resume
Case Else
'LogError Err.Number, Err.Description & "; " & strAttValue & ", " & strBucket, "AddBlocks", "modACAD.bas"
'MsgBox Err.Number & ": " & Err.Description
Resume Exit_Here
End Select
End Function