码迷,mamicode.com
首页 > 编程语言 > 详细

VBA Promming入门教程——变量的使用

时间:2018-10-04 09:03:05      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:http   hello   box   variables   ref   入门   height   www.   ant   

数据类型

VBA中的数据类型可分为两种

技术分享图片

技术分享图片

示例

String

1 Sub Main
2     Dim s as string
3     s = "Hello"
4     msgbox(s)
5 End Sub

Single和Double

1 Sub Main
2     Dim a as Single
3     Dim b as Double
4     a = 10 /3
5     b = 10 / 3
6     MsgBox(a)    3.333333‘
7     MsgBox(b)    3.33333333333333‘
8 End Sub

注:VBA注释符号是单引号

参考链接:https://www.guru99.com/vba-data-types-variables-constant.html

 

VBA Promming入门教程——变量的使用

标签:http   hello   box   variables   ref   入门   height   www.   ant   

原文地址:https://www.cnblogs.com/lfri/p/9741355.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!