Chinaunix首页 | 论坛 | 博客
  • 博客访问: 55821
  • 博文数量: 13
  • 博客积分: 512
  • 博客等级: 中士
  • 技术积分: 135
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-22 14:28
文章分类

全部博文(13)

文章存档

2011年(1)

2006年(12)

我的朋友

分类:

2006-08-19 02:15:01

所有代码加在一起只有五十行,看看效果,这个老外真牛.

Sub spin()
Dim out As Variant
Dim j As Integer, k As Integer
Dim s(3) As Integer
On Error Resume Next
Application.Calculation = xlCalculationManual
Application.StatusBar = ""
out = Array("L2", "L6", "L10")
s(0) = Worksheets("hidden").Range(out(0))
s(1) = Worksheets("hidden").Range(out(1))
s(2) = Worksheets("hidden").Range(out(2))
For j = 0 To 2
For k = 0 To 360
Worksheets("hidden").Range(out(j)) = (s(j) + k) Mod 360
Calculate
Next k
Next j
For k = 1 To 360
Worksheets("hidden").Range(out(0)) = (s(0) + k) Mod 360
Worksheets("hidden").Range(out(1)) = (s(1) + k) Mod 360
Worksheets("hidden").Range(out(2)) = (s(2) + k) Mod 360
Calculate
Next k
Application.DisplayStatusBar = oldStatusBar
Application.Calculation = xlCalculationAutomatic
End Sub

Sub spin()
Dim inp As Range, out As Variant
Dim j As Integer, k As Integer
Dim s(3) As Integer
Application.Calculation = xlCalculationManual
out = Array("AF1", "AF7", "AF13")
Set inp = ActiveSheet.Range("F26")
s(0) = Range(out(0))
s(1) = Range(out(1))
s(2) = Range(out(2))
For j = 0 To 2
For k = 1 To 360
Range(out(j)) = (s(j) + k) Mod 360
Calculate
Next k
Next j
For k = 1 To 360
Range(out(0)) = (s(0) + k) Mod 360
Range(out(1)) = (s(1) + k) Mod 360
Range(out(2)) = (s(2) + k) Mod 360
Calculate
Next k
Application.Calculation = xlCalculationAutomatic
End Sub

阅读(2143) | 评论(2) | 转发(0) |
0

上一篇:XP安装优化步骤

下一篇:VCS001_INSTALL

给主人留下些什么吧!~~