標題: [發問] Error 'Object variable or With block variable not set' [打印本頁] 作者: zxcxz 時間: 2014-2-9 17:26 標題: Error 'Object variable or With block variable not set'
以下程序執行到紅色部份就出現error 'Object variable or With block variable not set',原因是什麼?
來至微軟官方網:http://msdn.microsoft.com/en-us/library/office/aa195732%28v=office.11%29.aspx
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With作者: GBKEE 時間: 2014-2-9 18:00