键入不匹配,但代码工作

时间:2014-12-10 10:16:05

标签: type-mismatch

我知道这种话题很常见,但我无法找到问题的答案。任何人都可以帮我解决为什么会出现类型不匹配错误(但代码可以正常工作):

Sub CreateEMail2()
    Dim Email As String, Subj As String
    Dim Msg As String, URL As String
    Dim iCounter As Integer, x As Double

    For iCounter = 5 To WorksheetFunction.CountA(Columns(13))
        Email = Cells(iCounter, 13)

        Subj = "Atgādinājums par parādu"

        Msg = ""
        Msg = Msg & "Klients: " & Cells(iCounter, 1) & "," & vbCrLf & vbCrLf
        Msg = Msg & "Vēlamies atgādināt, ka uz epasta izsūtīšanas brīdi Jūsu kavētā parāda kopsumma sastāda EUR "

        Msg = Msg & Cells(iCounter, 6).Text & "." & vbCrLf & vbCrLf

        URL = "mailto:" & Email & "?subject=" & Subj & "&body=" & Msg

        ShellExecute 0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus

    Next iCounter
End Sub

谢谢!

0 个答案:

没有答案