|
楼主 |
发表于 2005-7-1 01:14
|
显示全部楼层
<P>运行起来似乎很慢,单位的机子差,运行着很困难</P><P>我买了本EXCEL的书,照着上面的例子写了一段代码:</P><P>Public Sub 结汇自动记录()
Dim ICOUNT As Integer
ICOUNT = Sheets("结汇情况").[A1].CurrentRegion.Rows.Count
Sheets("结汇情况").Select
Cells(ICOUNT + 1, 1) = Worksheets("美元自动结汇").Cells(27, 5)
Cells(ICOUNT + 1, 2) = Worksheets("美元自动结汇").Cells(31, 3)
Cells(ICOUNT + 1, 3) = Worksheets("美元自动结汇").Cells(31, 4)
Cells(ICOUNT + 1, 4) = Worksheets("美元自动结汇").Cells(29, 2)
Cells(ICOUNT + 1, 5) = Worksheets("美元自动结汇").Cells(29, 3)
Cells(ICOUNT + 1, 6) = Worksheets("美元自动结汇").Cells(29, 5)
Cells(ICOUNT + 1, 7) = Worksheets("美元自动结汇").Cells(29, 8)
Cells(ICOUNT + 1, 8) = Worksheets("美元自动结汇").Cells(5, 8)
Sheets("美元自动结汇").Select
MsgBox "记录保存成功!", vbOKOnly, "确定"</P><P>
End Sub
</P><P>这个比较快,格式也符合我的要求,但是是在同一个文件里汇总的,您眼睛亮,帮我看看,要把Sheets("结汇情况")这张表外置,需要添加什么代码?</P> |
|