我试试,谢谢啦
程序代码:
Private Sub Command1_Click() ExcelID.Visible = True '显示EXCEL ,如果不用显示,这里就不显示 ExcelID.Caption = "应用程序调用 Microsoft Excel" 'EXECL 标题 ExcelID.Workbooks.Open (Text1.Text) ' 打开文件 ExcelID.Worksheets.Item(1).Activate '设置第一个工作表为活动工作表 Dim 起始位置 As Long 起始位置 = CLng(InputBox("请输入起始行号", "起始行号", 4)) Dim j As Long Dim i As Long For j = 0 To List1.ListCount - 1 openEID.Workbooks.Open (List1.List(j)) ' 打开文件 openEID.Worksheets.Item(1).Activate '设置第一个工作表为活动工作表 For i = 1 To 79 ExcelID.Cells(起始位置 + j, 坐标(i).NEWY) = openEID.Cells(坐标(i).OLDY, 坐标(i).OLDX) Next i openEID.Quit Call 进度条(j / (List1.ListCount - 1)) Next j ExcelID.SaveWorkspace ExcelID.Quit End Sub
程序代码:
Call 置坐标(1, "67,3,31") Call 置坐标(2, "66,7,30") Call 置坐标(3, "5,3,4") Call 置坐标(4, "6,5,4") Call 置坐标(5, "57,5,22") Call 置坐标(6, "4,7,3") Call 置坐标(7, "44,7,17") Call 置坐标(8, "33,3,14") Call 置坐标(9, "35,7,14") Call 置坐标(10, "34,5,14") Call 置坐标(11, "50,3,20") Call 置坐标(12, "65,5,30") Call 置坐标(13, "12,5,7") Call 置坐标(14, "59,5,23") Call 置坐标(15, "60,3,28") Call 置坐标(16, "9,5,6") Call 置坐标(17, "15,5,8") Call 置坐标(18, "17,3,9") Call 置坐标(19, "25,3,11") Call 置坐标(20, "27,3,12") Call 置坐标(21, "26,5,11") Call 置坐标(22, "62,3,29") Call 置坐标(23, "43,5,17") Call 置坐标(24, "64,3,30") Call 置坐标(25, "16,7,8") Call 置坐标(26, "3,5,3") Call 置坐标(27, "56,3,22") Call 置坐标(28, "41,7,16") Call 置坐标(29, "38,7,15") Call 置坐标(30, "24,7,10") Call 置坐标(31, "21,5,10") Call 置坐标(32, "18,5,9") Call 置坐标(33, "61,7,28") Call 置坐标(34, "70,3,27") Call 置坐标(35, "73,4,27") Call 置坐标(36, "76,5,27") Call 置坐标(37, "79,6,27") Call 置坐标(38, "82,7,27") Call 置坐标(39, "14,3,8") Call 置坐标(40, "36,3,15") Call 置坐标(41, "37,5,15") Call 置坐标(42, "69,3,26") Call 置坐标(43, "72,4,26") Call 置坐标(44, "75,5,26") Call 置坐标(45, "78,6,26") Call 置坐标(46, "81,7,26") Call 置坐标(47, "29,7,12") Call 置坐标(48, "51,5,20") Call 置坐标(49, "55,7,21") Call 置坐标(50, "7,7,4") Call 置坐标(51, "8,3,6") Call 置坐标(52, "40,5,16") Call 置坐标(53, "42,3,17") Call 置坐标(54, "39,3,16") Call 置坐标(55, "49,5,19") Call 置坐标(56, "58,3,23") Call 置坐标(57, "28,5,12") Call 置坐标(58, "30,3,13") Call 置坐标(59, "2,3,3") Call 置坐标(60, "45,3,18") Call 置坐标(61, "53,3,21") Call 置坐标(62, "52,7,20") Call 置坐标(63, "48,3,19") Call 置坐标(64, "47,7,18") Call 置坐标(65, "20,3,10") Call 置坐标(66, "10,7,6") Call 置坐标(67, "11,3,7") Call 置坐标(68, "46,5,18") Call 置坐标(69, "13,7,7") Call 置坐标(70, "63,7,29") Call 置坐标(71, "54,5,21") Call 置坐标(72, "19,7,9") Call 置坐标(73, "31,5,13") Call 置坐标(74, "32,7,13") Call 置坐标(75, "68,3,25") Call 置坐标(76, "71,4,25") Call 置坐标(77, "74,5,25") Call 置坐标(78, "77,6,25") Call 置坐标(79, "80,7,25") End Sub Private Sub 置坐标(cs As Long, cs2 As String) Dim fj() As String fj = Split(cs2, ",") 坐标(cs).NEWY = fj(0) 坐标(cs).OLDX = fj(1) 坐标(cs).OLDY = fj(2) End Sub