ユーザーフォームの TextBox3 に入力されたデータ
1-20, 30, 40-50, 70,
から、1以上20以下、30、40以上50以下、70 と導き出す事で、印刷範囲やCSV書き出し範囲として利用する
文字や空白、ゼロは無視する事で、余計なカンマにも対応

Sub csvtest()
    Dim tmp As Variant, tmp2 As Variant
    Dim i As Long
    Dim lngS As Long, lngE As Long
    Dim strTextBox As String
    
    Dim lngInStr As Long
    
    '-------------------------
    
    strTextBox = Me.TextBox3.Text
    
    If strTextBox = "" Then
        MsgBox "入力データありません", vbExclamation
        Exit Sub
    End If
    
    '配列に区切り文字「,」のデータを所得
    tmp = Split(strTextBox, ",")
    
    For i = 0 To UBound(tmp)
    
        '-------------------------
        
        'その配列文字を、再度、区切り文字「-」で別の配列に取得
        lngInStr = InStr(tmp(i), "-")
    
        '配列に「-」があったら(範囲指定がある)
        If Not (lngInStr = 0) Then
            
            tmp2 = Split(tmp(i), "-")
        
            lngS = Val(tmp2(0))
            lngE = Val(tmp2(1))
        
            '開始数字より終了数字の方が大きくないといけない
            'ゼロではいけない
            If Not (lngS < lngE) Or lngS = 0 Or lngE = 0 Or UBound(tmp2) > 1 Then
                MsgBox "設定に誤りがあります", vbExclamation
                Exit Sub
            End If
        
            MsgBox lngS & "以上 " & lngE & "以下", vbInformation
        
        '配列に「-」が無かったら(範囲指定がない)
        Else
        
            'ゼロではいけない
            If Not (Val(tmp(i)) = 0) Then
                MsgBox Val(tmp(i)), vbInformation
            End If
        
        End If
    
    Next i

End Sub