I want to hand over paramters to another sub. Trying to build a toolbox of snippets i am using often.
Modul1
Dim sheet_calc As String: Set sheet_calc = "calc"
Modul3.check_sheet(sheet_calc, "Main", True)
Modul3 (ToolModul what i want to build)
Private Sub check_sheet(sheetname As String, positionsheet As String, delt As Boolean)
    
    For Each Sheet In ActiveWorkbook.Worksheets
         If Sheet.Name = sheetname Then
              Sheet.Delete
         End If
    Next Sheet
    
    If delt = True Then
        ActiveWorkbook.Sheets.Add(After:=positionsheet).Name = sheetname
    End If
End Sub
An error occure. Is this the right way to build this? I dont understand how to code subs as toolbox. Can someone help and explain me how this works. My research confused me more.