我想将文本1.txt里的内容,如下
12345 45678 99999 6785
34545 23456 87876 5656
转换成文字我用下面的代码
If Trim(textLine) <> "" And Right(Trim(textLine), 1) = "=" Then
       StrConv (textLine)
    End If
能将
12345 45678 99999 6785=
34545 23456 87876 5656=
成功转换要是文本里的内容变为
12345 45678 99999 6785
34545 23456 87876 5656将If Trim(textLine) <> "" And Right(Trim(textLine), 1) = "=" Then
里的"="改成什么?

解决方案 »

  1.   

    你应该输入错了 逻辑不对If Trim(textLine) <> "" And Right(Trim(textLine), 1) = "=" Then
           StrConv (textLine)
    End If
      

  2.   

    不小心发出去了If Trim(textLine) <> "" And Right(Trim(textLine), 1) = "=" Then
          '后面有=    12345 45678 99999 6785=
          
          '处理
    else
          '后面没有=   12345 45678 99999 6785      '处理 
    End If
      

  3.   

    If Trim(textLine) <> "" then
    if Right(Trim(textLine), 1) <> "=" Then textline=textline+"="
    StrConv (textLine)End If
      

  4.   

    你的意思是,一行中可能有等号,也可能没有等号。想同样正常转换。对吗?不知你的 StrConv 函数是否要求等号。假定是要求的:
    textLine = Trim(textLine)
    If  Right(textLine, 1) <> "=" Then textLine = textLine & "="
    StrConv (textLine)
      

  5.   

    textLine = Trim(textLine)
    If textLine > "" Then
       If Right(textLine, 1) <> "=" Then textLine = textLine & "="
       StrConv (textLine)
    End If