- 帖子
- 835
- 主題
- 6
- 精華
- 0
- 積分
- 915
- 點名
- 0
- 作業系統
- Win 10,7
- 軟體版本
- 2019,2013,2003
- 閱讀權限
- 50
- 性別
- 男
- 註冊時間
- 2010-5-3
- 最後登錄
- 2025-7-5
|
2#
發表於 2014-10-30 22:04
| 只看該作者
本帖最後由 luhpro 於 2014-10-30 22:14 編輯
Sub MA3333()
Dim tou, aa
SET TOU = Range("A300").End(xlUp).Offset(0, 1) '所在位置
Set aa = Range ...
t8899 發表於 2014-10-30 18:42 
Set aa = Range(tou, [B222]).Find(What:="", LookIn:=xlFormulas, SearchOrder:=xlByColumns) '所在位置到B222 找空白的儲存格
另 :
If aa Is Nothing Then
MsgBox aa.Address
End If
永遠不會正確執行.
因為當 aa Is Nothing 時, aa 為空值,
會出現 "沒有設定物件變數或 With 區域變數" 的錯誤.
應該改成 :
If Not aa Is Nothing Then |
|