则程序跳到标签X处 MsgBox 1到100的自然数和为: Lsum
时间:2023-03-05 13:10:43
“Go to ”就是去到哪儿的意思。Go to 语句是将程序转到指定的标签的语句位置,然后继续往下执行。
Go to 语句通常用来作错误处理。下面为大家介绍该语句的示例。
下面的代码功能是:求1到100自然数之和。
Dim Lsum As Long, i As Long
i = 1
x: ‘为go to 语句设置的标签,必须以英文状态下的冒号结尾
Lsum = Lsum + i
i = i + 1
If i <= 100 Then GoTo x ‘如果i<=100,则程序跳到标签X处
MsgBox "1到100的自然数和为:" & Lsum
标签:奇数,标签,自然数,语句,Excel教程
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
预定完Win10后右下角推送图标消失是怎么回事
2023-10-02 14:34:01
![](https://img.aspxhome.com/file/2023/28/a249343_0s.jpg)
wps表格怎样导入数据
2022-04-07 04:11:23
win10怎么把字体调大
2023-08-23 06:55:04
![](https://img.aspxhome.com/file/2023/3/a298216_0s.png)
电脑运行foxmail提示access violation的解决办法
2023-08-03 18:47:41
![](https://img.aspxhome.com/file/2023/3/a299331_0s.jpg)
Windows无法访问指定设备路径或文件夹怎么办?
2023-03-16 16:00:13
![](https://img.aspxhome.com/file/2023/6/a322274_0s.jpg)
Win10提示自动修复无法修复电脑的解决方法
2022-12-26 11:43:58
![](https://img.aspxhome.com/file/2023/1/a279977_0s.jpg)
Win10系统如何禁用光驱?禁止读取光驱的方法
2023-11-29 10:09:58
![](https://img.aspxhome.com/file/2023/26/a225700_0s.jpg)
电脑版wps表格如何在稻壳中下载图标
2023-02-13 08:51:02
![](https://img.aspxhome.com/file/2023/7/a183897_0s.png)
怎么解决Win11 22449 bug?解决Win11 22449 bug的四种方法
2022-04-01 18:41:08
![](https://img.aspxhome.com/file/2023/1/a278602_0s.jpg)
怎样删除wps表格的空白行
2023-10-19 01:22:54
wps表格怎样使用橡皮擦
2022-03-26 10:57:15
Photoshop如何精修嘴唇?制作唇彩方法
2023-10-14 19:43:04
![](https://img.aspxhome.com/file/2023/8/a336257_0s.jpg)
word2003如何改变文字方向
2023-04-16 04:35:19
![](https://img.aspxhome.com/file/2023/2/21712_0s.jpg)
WPS 2010 安全技巧详解
2023-04-14 07:06:17
![](https://img.aspxhome.com/file/2023/8/a165198_0s.jpg)
怎么提高宽带网速 系统设置释放带宽的操作方法
2022-08-24 20:26:56
![](https://img.aspxhome.com/file/2023/3/a292651_0s.jpg)
Win11应用商店无法打开怎么办?
2022-10-15 08:09:26
![](https://img.aspxhome.com/file/2023/1/a273148_0s.jpg)
如何在Lightroom Classic中处理视频?教程来了
2022-07-18 17:44:40
![](https://img.aspxhome.com/file/2023/10/a344565_0s.jpeg)
3dmark无效的分数怎么解决-3dmark无效的分数解决方法
2023-12-05 23:32:13
![](https://img.aspxhome.com/file/2023/3/a299444_0s.jpg)
win10系统资源快速访问的五种方法
2023-01-04 09:31:37
![](https://img.aspxhome.com/file/2023/28/a245437_0s.jpg)
深度爆料新版Win10推迟原因只因为1个Bug
2023-03-18 22:25:52
![](https://img.aspxhome.com/file/2023/4/a305759_0s.jpg)