您现在的位置: 公文易 >> 免费论文 >> 理工论文 >> 论文正文 >> Excel VBA在工程测量上的应用
归档:理工论文 推荐度:
日期:2006-3-15 9:10:00

Excel VBA在工程测量上的应用

字体大小:
Excel VBA在工程测量上的应用
Set sht = ThisWorkbook.ActiveSheet

Do While sht.Cells(m + 3, 4) <> ""

m = m + 1

Loop

For n = 3 To m + 2

ms = DEG(ms) + DEG(sht.Cells(n, 4))

ms = RAD(ms)

S = S + sht.Cells(n, 3)

Next

ms = DEG(ms)

gg = RAD(DEG(sht.Cells(3, 5)) + ms - DEG(sht.Cells(3 + m, 5)) - pi * m)

xx = 0: yy = 0

For n = 4 To m + 2

'方位角

sht.Cells(n, 5) = RAD(DEG(sht.Cells(n - 1, 5)) + DEG(sht.Cells(n - 1, 4)) - pi - DEG(gg) / m)

'坐标增量

sht.Cells(n, 6) = Format(sht.Cells(n - 1, 3) * Cos(DEG(sht.Cells(n, 5))), "#####.####")

sht.Cells(n, 7) = Format(sht.Cells(n - 1, 3) * Sin(DEG(sht.Cells(n, 5))), "#####.####")

'坐标增量和

xx = xx + sht.Cells(n, 6)

yy = yy + sht.Cells(n, 7)

Next

xx = xx + sht.Cells(3, 10) - sht.Cells(m + 2, 10)

yy = yy + sht.Cells(3, 11) - sht.Cells(m + 2, 11)

sht.Cells(m + 4, 5) = "△α=" & Format(gg, "###.######")

sht.Cells(m + 4, 6) = "△X=" & Format(xx, "###.###")

sht.Cells(m + 4, 7) = "△Y=" & Format(yy, "###.###")

sht.Cells(m + 4, 3) = "∑S=" &a

上一页  [1] [2] [3] [4] [5] [6] [7] 下一页




推荐文章

我得网服务大全:适时新闻 | 秘书资讯 | 专题文档 | 实用查询 | 新华字典,词典 | 成语词典 | 全唐诗 | 歇后语大全
关于我们 | 版权与隐私 | 爱心救助 | 加入会员 | 网站地图 | !报告错误 | 联系方式
公文易爱心文秘网,我得网 © 2003-2009