[VBA ] 1004 錯誤訊息 - 應用程式或物件定義上的錯誤

看板Visual_Basic作者 (龍心dragonmiss)時間16年前 (2010/01/26 19:51), 編輯推噓0(002)
留言2則, 1人參與, 最新討論串1/1
這個sub的程式是在sheet1活頁簿裡面 Private Sub CommandButton2_Click() With Sheet4 .Cells(6, 2) = MonthName(1) .Cells(6, 2).Select Selection.AutoFill Destination:=Range(Cells(6, 2), Cells(17, 2)), Type:=xlFillValues ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 主要錯誤的地方 不過小弟我是第一次用VBA 如果可以給我範例會更好 .Range(Cells(6, 2), Cells(17, 2)).Select End With End Sub 或者可以清楚告訴我,物件、屬性、方法置三者間的關係。 我翻過了功能索引式參考手冊以及一些VBA的介紹書。 不過還是不是很理解。 謝謝各位的幫忙。 -- ◣ 喵~ =﹣▆▄▂▃▄ ▁ ▁ ▂●▄ ▎ ▅▆▄_ ◢▎ ◢ ▃▅▄▃ ◢╭。 "▄▏ ▆▅ ◤ ◥◤ ╰╯ ▏▼▆+ " =▎dragonmiss@wretch ═════════════ ═══" ════════════ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.128.227.4

01/26 20:06, , 1F
剛剛做了一些測試,.Cells(6, 2).Select這又會有問題了
01/26 20:06, 1F
dodolon:轉錄至看板 Office 01/27 07:38

02/09 16:41, , 2F
已解決
02/09 16:41, 2F
文章代碼(AID): #1BNjStaG (Visual_Basic)