添加一模块 把需要调用的vba代码模块作用域写成public 如:
pulibc function test()
end function
Sub aa()
For j = 1 To Worksheets.Count
With Worksheets(j)
For i = 3 To 32
If .Cells(i, 7).Value = "" Then 'i代表行,1代表列
.Cells(i, 7).Value = .Cells(i, 6).Value
End If
Next
End With
Next
End Sub
是可再看下的