,但是工作業需求,想請教大師們有關於VBA的問題如圖一中,我想在EXCEL中輸入資料並按[新增]按鈕時資料就會自動存到圖二的工作表,但我嘗試寫了程式碼,但是都沒什麼反應>"<
希望可以教教我如何修改程式碼,感恩
....Private Sub CommandButton1_Click()
Dim a(7)
Sheets("資料庫").Select
If Range("A2") = " " Then
j = 1
Else
j = Range("A1").End(xlDown).Row
End If
Sheets("輸入畫面").Select
a(0) = Range("H2"): a(1) = Range("D2"): a(2) = Range("D3")
a(3) = Range("D4"): a(4) = Range("H4"): a(5) = Range("D5")
a(6) = Range("H3"): a(7) = Range("B26")
End Sub
<圖一>
![[EXCEL VBA] 求解](http://attach.mobile01.com/attach/201807/mobile01-e2cdaa99ab47c7ed6437d56e78b870f5.png)
<圖二>
![[EXCEL VBA] 求解](http://attach.mobile01.com/attach/201807/mobile01-2835072d2731371696854097100fecbc.png)




























































































