第一种方法:打开另一个文件,copy,paste:触发按钮单机事件,VBA如下:[code=vb] Private Sub CommandButton1_Click()Dim towb As WorkbookDim tows As WorksheetDim torow As IntegerDim fromwb As WorkbookDim fromws As WorksheetDim fromrow As IntegerDim projectnameDim iDim openfiles
'input the filepath of y...
解决方式:Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False Dim Sql$, Cnn As Object On Error Resume Next Set Cnn = CreateObject("ADODB.conne...