[VBA ] 1004 錯誤訊息 - 應用程式或物件定義上的錯誤
這個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
01/26 20:06, 1F
※ dodolon:轉錄至看板 Office 01/27 07:38
→
02/09 16:41, , 2F
02/09 16:41, 2F