- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
办公中常用到的excel-vba编程(Excel-vba programming commonly used in office)
办公中常用到的excel-vba编程(Excel-vba programming commonly used in office)
Excel-VBA programming commonly used in office
People who have used VB should know how to declare variables, and declare variables exactly the same in VB as in VBA!
Using the Dim statement
Dim a As Integer declares a to be an integer variable
Dim a declares a as a variant variable
Dim a as string declares a as a string variable
Dim, a, as, currency, B, as, currency, C, as, currency. Declare a, B, and C as monetary variables
You can declare variables: Byte, Boolean, Integer, Long, Currency, Single, Double, Decimal (currently not supported), Date, String (only for variable length strings * length (String), fixed length string), Object, Variant, user defined type or object type.
Mandatory declaration variable
Option Explicit
Explanation: the statement must appear in the module before any process occurs.
Declare constant
Used instead of literal values.
Const
The default state of the constant is Private.
Const My = 456
declare the Public constant.
Public Const MyString = HELP
declare Private Integer constant.
Private, Const, MyInt, As, Integer = 5
in the same row declare multiple constants.
Const MyStr = Hello, MyDouble As, Double = 3.4567
Select the area in which the current cell is located
In EXCEL97, there is a very good function, he is to put the mouse in a valid data cell, the execution of the code, you can put together a piece of data all selected. Just add that piece of code to your module.
Sub My_Select
Selection.CurrentRegion.Select
End sub
Returns the value of the space before and after the data is deleted in the current cell
Sub my_trim
Msgbox Trim (ActiveCell.Value)
End Sub
Cell displacement
Sub my_offset
ActiveCell.Offset (0, 1).Selectmoves a cell to the left of the current cell
ActiveCell.Offset (0, -1).Selectmoves the current cell to the right
ActiveCell.Offset (1, 0).Selectmoves a grid down the current cell
ActiveCell.Offset (-1, 0).Selectmoves the current cell up a grid
End Sub
If the above
您可能关注的文档
- 【台湾】2015台湾乡村休闲农业考察体验交流之旅(2015年7月12-18日)([Taiwan] 2015 Taiwan Rural Leisure Agriculture inspection experience exchange trip (12-18 July 2015)).doc
- 【寄语】对大一新生的忠告。([message] for freshman advice.).doc
- 【封面故事】富士康的夜生活([cover story] Foxconn's nightlife).doc
- 【完成】低碳经济([complete] low carbon economy).doc
- 【成都】商业改变生活方式与招商运营培训+考察(2015年4月25日)([Chengdu] business change lifestyle and investment operation training + Inspection (April 25, 2015)).doc
- 【慧人慧语】1.成熟的人不问过去,聪明的人不问现在,豁达的人不问未来。2.在人之上,要把人当人,在人([wisdom 1.] mature people ask no past; wise men ask no present; open-minded men ask no future. 2. above man, man should be man, man).doc
- 【成都】现代商业全流程运营管控与创新多平台营销推广模式(8月23日)([Chengdu] modern business process management and innovation, multi platform marketing model (August 23rd)).doc
- 【成都】电商时代下商业地产全程运营、开业后品牌调整培训(2015年4月25日)([Chengdu] under the electricity supplier era of commercial real estate throughout the operation, after the opening of brand adjustment training (April 25, 2015)).doc
- 【哲思语录】([quote] Philosophy).doc
- 【手册】从动漫fan到全能coser—新人手册【全】([manual] from Anime fan to universal Coser - new manual [Full]).doc
- 办公场所(Office space).doc
- 办公大楼8层无线覆盖方案(8 layer wireless coverage scheme for office building).doc
- 初级_采气工 有答案(The primary _ gasworker answer).doc
- 办公实务(Office practice).doc
- 办公室5个不良饮食习惯让你容易长石头(The office's 5 bad eating habits make it easier for you to grow rocks).doc
- 办公室主任如何做好服务(How can the office director do the service well).doc
- 办公室主任演讲辞(Speech by the head of the Office).doc
- 办公室主任(Director of General Office).doc
- 办公室保健(Office health).doc
- 初高中数学公式大全(Math formulas for elementary and high school).doc
文档评论(0)