以下是我的代码:
Sub Macro1()
Dim s As String
s = Left("ABC")
s = Left("ABC", 1)
Range("A20") = s
End Sub
以下是我的代码:
Sub Macro1()
Dim s As String
s = Left("ABC")
s = Left("ABC", 1)
Range("A20") = s
End Sub
s = Left("ABC")
Left函数用来从字符串左边截取子串,所以需要知道子串的长度,而你这里没有长度的参数
下面一行才是对的