因为工作的原因,需要用到VBA,碰到读图片和写图片: Sub Macro01() '从工作表中保存图片 Application.ScreenUpdating = False Dim pth, shp, n pth = ThisWorkbook.Path & "\导出图片\" For Each shp In ActiveSheet.Shapes Then n = n + shp.Copy , , shp.Width, shp.Height).Chart .Parent.Selec
sub 汇总多个工作簿() Application.ScreenUpdating = False Dim wb As Workbook, f As String, l As String, n As String, m As String, j As Integer f = ThisWorkbook.Path & "\" l = f & "*.xls" m = Dir(l) Do While m <> "" If m
Option Compare Database Private Sub Command0_Click() Dim db Dim rs As Recordset Dim str As String Set db = CurrentDb Set rs = db.OpenRecordset("select * From [test]") rs.MoveFirst str = "all date:" If Not rs.EOF Then Do While Not rs.EO
动态数组使用: https://zhidao.baidu.com/question/1432222709706721499.html 使用Redim动态数组即可. 1 2 3 4 5 6 7 8 Sub test1() Dim a() As Integer, iRow As Long, i As Integer iRow = Cells(Rows.Count, 1).End(xlUp).Row ReDim a(iRow - 1) For i = 1 To UBou