arthur 发表于 2012-10-26 11:59:08

VBA详细教程 [pdf]







arthur 发表于 2012-10-26 12:01:46

免费 下载 分享 应用 教程
目 录
一、 VBA 语言基础 ...................................................................................................................1 ...................................................................................................................1 ...................................................................................................................1
第一节 标识符 ............................................................................................................................... ..... 1
第二节 运算符 ............................................................................................................................... ..... 1
第三节 数据类型 ............................................................................................................................... . 1
第四节 变量与常量 ............................................................................................................................1
第五节 数组 ............................................................................................................................... ......... 2
第六节 注释和赋值语句 ....................................................................................................................2
第七节 书写规范 ............................................................................................................................... . 2
第八节 判断语句 ............................................................................................................................... . 2
第九节 循环语句 ............................................................................................................................... . 3
第十节 其他类语句和错误语句处理 ................................................................................................4
第十一节 过程和函数 ........................................................................................................................4
一. Sub 过程 ........................................................ ......... 4
二. Function 函数 ................................................... ......... 5
三. Property 属性过程和 Event 事件过程 ....................................... .. 5
第十二节内部函数 .............................................................................................................................5
一.测试函数 ......................................................... ....... 5
二.数学函数 ......................................................... ....... 5
三.字符串函数 ........................................................ ...... 5
四.转换函数 ......................................................... ....... 6
五.时间函数 ......................................................... ....... 6
第十三节 文件操作 ............................................................................................................................6
文件 ............................................................. ........... 6
删除 ............................................................. ........... 6
打开 ............................................................. ........... 6
读入 ............................................................. ........... 7
写入 ............................................................. ........... 7
关闭 ............................................................. ........... 7
其他文件函数 ......................................................... ....... 7
二、 VISUAL BASIC 程序设计网络教学 .....................................................................................1 .....................................................................................1 .....................................................................................1
第一课 VBA 是什么 .................................................................................................................1 .................................................................................................................1 .................................................................................................................1
1.1 VBA 是什么 ............................................................................................................................... ..... 1
1.2 EXCEL 环境中基于应用程序自动化的优点 ................................................................................1
1.3 录制简单的宏 ..............................................................................................................................1
1.4 执行宏 ............................................................................................................................... ........... 2
1.5 查看录制的代码 ..........................................................................................................................2
1.6 编辑录制的代码 ..........................................................................................................................3
1.7 录制宏的局限性 ..........................................................................................................................3
1.8 小结 ............................................................................................................................... ............... 3
第二课 处理录制的宏 ............................................................................................................3 ............................................................................................................3 ............................................................................................................3
2.1 为宏指定快捷键 ..........................................................................................................................3
2.2 决定宏保存的位置 ......................................................................................................................4
2.3 个人宏工作簿 ..............................................................................................................................4
2.3.1 保存宏到个人宏工作簿 ............................................... ... 4
2.3.2 使用并编辑个人宏工作簿中的宏 .......................................... 4
2.4 将宏指定给按钮 ..........................................................................................................................4
2.5 将宏指定给图片或其他对象 ......................................................................................................5
2.6 小结 ............................................................................................................................... ............... 5
第三课 学习控件 ...................................................................................................................5 ...................................................................................................................5 ...................................................................................................................5
3.1 EXCEL 开发过程简介 ....................................................................................................................5
3.2 认识不同的控件 ..........................................................................................................................5
3.3 向工作表添加控件 ......................................................................................................................6
3.4 设置控件的特性 ..........................................................................................................................6
3.5 给控件命名 ............................................................................................................................... ... 6
3.6 使用用户窗体 ..............................................................................................................................6
3.7 疑难解答 ............................................................................................................................... ....... 7

arthur 发表于 2012-10-26 12:03:40

第四课 理解变量和变量的作用 ..............................................................................................7 ..............................................................................................7 ..............................................................................................7
4.1 代码存在的位置:模块 ..............................................................................................................7
4.2 对模块的概览 ..............................................................................................................................7
4.2.1 创建过程 ..................................................... ......... 8
4.2.2 运行宏 ...................................................... .......... 9
4.3 保存对模块所做的改变 ..............................................................................................................9
4.4 变量 ............................................................................................................................... ............... 9
4.4.1 变量的数据类型 .................................................. ...... 9
4.4.2 用 Dim 语句创建变量 ( 声明变量 ) ......................................... . 10
4.4.3 变量命名的惯例 .................................................. ..... 10
4.4.4 使用数组 ..................................................... ........ 10
4.4.5 变量赋值 ..................................................... ........ 11
第五课 利用 VBA 设置工作表使用权限 ...................................................................................11 ...................................................................................11 ...................................................................................11
1 .使用 W ITH 语句。 ..........................................................................................
2 .使用对象变量。 .........................................................................................
方法 3 :减少对象的激活和选择 ....................................................................
方法 4 :关闭屏幕更新 ....................................................................................
第六课 提高 EXCEL 中 VBA 的效率 ............................................................................................12 ............................................................................................12 ............................................................................................12
方法 1 :尽量使用 VBA 原有的属性、方法和 W ORKSHEET 函数 ............................................................12
方法 2 :尽量减少使用对象引用,尤其在循环中 .........................................................................12
1 .使用 With 语句。 .................................................... ...... 12
2 .使用对象变量。 ...................................................... .... 12
3 .在循环中要尽量减少对象的访问。 .......................................... 13
方法 3 :减少对象的激活和选择 ....................................................................................................13
方法 4 :关闭屏幕更新 ....................................................................................................................13
第七课 如何在 EXCEL 里使用定时器 .......................................................................................13 .......................................................................................13 .......................................................................................13
三、学习微软 EXCEL 2002 VBA 编程和 XML , ASP 技术 ...........................................................15 ...........................................................15 ...........................................................15
第一章 电子表格自动化简介和了解宏命令 ...........................................................................15 ...........................................................................15 ...........................................................................15
1 了解宏 ............................................................................................................................... ............. 15
2 宏命令的普通应用 ........................................................................................................................15
3 写宏之前的计划 ............................................................................................................................16
4 录制宏 ............................................................................................................................... ............. 17
5 运行宏 ............................................................................................................................... ............. 18
6 修改宏代码 ............................................................................................................................... ..... 19
7 添加注释 ............................................................................................................................... ......... 21
8 分析宏代码 ............................................................................................................................... ..... 22
9 清除宏代码 ............................................................................................................................... ..... 23
10 测试修改好的宏 ..........................................................................................................................24
11 两个层面运行宏的方法 ..............................................................................................................24
12 完善你的宏代码 ..........................................................................................................................25
13 重新命名宏 ............................................................................................................................... ... 27
14 运行宏的其它方法 ......................................................................................................................2715 使用键盘快捷键运行宏 ..............................................................................................................27
16 通过菜单运行宏 ..........................................................................................................................28
17 通过工具栏按钮运行宏 ..............................................................................................................30
18 通过工作表里面的按钮运行宏 ..................................................................................................31
19 保存宏 ............................................................................................................................... ........... 32
20 打印宏 ............................................................................................................................... ........... 32
21 保存宏在个人宏工作簿 ..............................................................................................................32
22 打开含有宏的工作簿 ..................................................................................................................34
23VB 编辑窗口 ............................................................................................................................... .... 35
24 了解工程浏览窗口 ......................................................................................................................35
25 了解属性窗口 ..............................................................................................................................36
26 了解代码窗口 ..............................................................................................................................36
27 VB 编辑器里的其它窗口 ..............................................................................................................38
28 接下来 …… ............................................................................................................................... ... 39

arthur 发表于 2012-10-26 12:05:33

目录还有很多,我就不贴出来了,大家下载了,自己浏览吧
……
……
……

Bogdanocd 发表于 2021-8-31 20:18:16

Where is Administration ict.ivfan.com ??

arthur ??? 2012-10-26 12:03 static/image/common/back.gif
??? ?????????? ........................................................................ ...

Can I contact admin??
It is about advertisement on your website.
Thank.
页: [1]
查看完整版本: VBA详细教程 [pdf]