回 帖 发 新 帖 刷新版面

主题:不明语句,请大家指点

Private Sub Form_Load()
  Dim location As Integer, n As Integer, source As String, target As String
  Show
  source = "East and west,home is best!": target = "st"
  location = 1: n = 0
  location = InStr(location, source, target) + 1
  Do While location > 1
    n = n + 1
    location = InStr(location, source, target) + 1
  Loop
  Print n
End Sub
其中source = "East and west,home is best!": target = "st"
     location = 1: n = 0
这两条语句何解?请大家指点,谢谢了

回复列表 (共1个回复)

沙发

发错地方了,呵呵,不好意思

我来回复

您尚未登录,请登录后再回复。点此登录或注册