- 帖子
- 6
- 主題
- 1
- 精華
- 0
- 積分
- 7
- 點名
- 0
- 作業系統
- Vista
- 軟體版本
- office 2010
- 閱讀權限
- 10
- 註冊時間
- 2014-6-28
- 最後登錄
- 2017-1-8
|
[發問] Excel VBA 如何用 inputbox 取得儲存格的行與列
我想要使用 inputbox 取得某儲存格的行與列,
寫了下列的 VBA 的是一直出現錯誤, 請教大家問題點在那,
感謝幫忙.
Dim code As Range
Dim Code_Row As Integer
Dim Code_Column As Integer
code = Application.InputBox(prompt:="輸入 Code 欄位") '出現沒有設定物件變數或 with 區塊變數
If code = "" Then Exit Sub
Code_Row = code.Row
Code_Column = code.Column |
|