中关村在线

首页 排行 新品 问答 下载 论坛 手机 笔记本 数码相机 主板 显卡 平板电脑 更多

excel中如何利用“宏”建立窗体指令按钮?怎么在excel中利用“宏”建立

举报
讨论回答 (6)
347513791
595624850
ruoxuan8023
xiao_xiao__048
cainiao31
工具--宏---Visudl Basic编辑器---插入--模块1
Sub Macro1()
'
'

'
Rows("1:1").Select
Selection.EntireRow.Hidden = True
Application.Goto Reference:="R101:R65536"
Selection.EntireRow.Hidden = True
End Sub

再插入模块2
Sub Macro2()
'
'
'

'
Rows("1:100").Select
Range("A100").Activate
Selection.EntireRow.Hidden = True
ActiveWindow.SmallScroll Down:=12
Application.Goto Reference:="R201:R65536"
Selection.EntireRow.Hidden = True
ActiveWindow.SmallScroll Down:=-51
End Sub
插入--模块3
Sub Macro3()
'
'
'

'
Rows("1:1").Select
Selection.EntireRow.Hidden = True
ActiveWindow.SmallScroll Down:=90
Range("A101:B9923").Select
ActiveWindow.ScrollRow = 9938
ActiveWindow.ScrollRow = 9997
ActiveWindow.ScrollRow = 10085
ActiveWindow.ScrollRow = 10203
ActiveWindow.ScrollRow = 10291
ActiveWindow.ScrollRow = 10438
ActiveWindow.ScrollRow = 10615
ActiveWindow.ScrollRow = 10762
ActiveWindow.ScrollRow = 10909
ActiveWindow.ScrollRow = 11085
ActiveWindow.ScrollRow = 11232
ActiveWindow.ScrollRow = 11408
ActiveWindow.ScrollRow = 11555
ActiveWindow.ScrollRow = 11761
ActiveWindow.ScrollRow = 11938
ActiveWindow.ScrollRow = 12173
ActiveWindow.ScrollRow = 12379
ActiveWindow.ScrollRow = 12584
ActiveWindow.ScrollRow = 12878
ActiveWindow.ScrollRow = 13084
ActiveWindow.ScrollRow = 13408
ActiveWindow.ScrollRow = 13584
ActiveWindow.ScrollRow = 13819
ActiveWindow.ScrollRow = 14113
ActiveWindow.ScrollRow = 14466
ActiveWindow.ScrollRow = 14790
ActiveWindow.ScrollRow = 15201
ActiveWindow.ScrollRow = 15583
ActiveWindow.ScrollRow = 15936
ActiveWindow.ScrollRow = 16260
ActiveWindow.ScrollRow = 16612
ActiveWindow.ScrollRow = 16965
ActiveWindow.ScrollRow = 17347
ActiveWindow.ScrollRow = 17700
ActiveWindow.ScrollRow = 18024
ActiveWindow.ScrollRow = 18376
ActiveWindow.ScrollRow = 18788
ActiveWindow.ScrollRow = 19082
ActiveWindow.ScrollRow = 19229
ActiveWindow.SmallScroll Down:=1017
Range("K20448").Select
Selection.End(xlDown).Select
Range("A54262:A65536").Select
Range("A65536").Activate
Application.Goto Reference:="R101C1:R65536C1"
ActiveWindow.SmallScroll Down:=-18
Range("C98").Select
Application.Goto Reference:="R301C1:R65536C1"
Range("A305").Select
Application.Goto Reference:="R301C1:R65536C1"
Rows("305:305").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.SmallScroll ToRight:=253
Application.Goto Reference:="R301:R65536"
Selection.EntireRow.Hidden = True
ActiveWindow.ScrollRow = 274
ActiveWindow.ScrollRow = 183
ActiveWindow.ScrollRow = 92
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 243
ActiveWindow.ScrollColumn = 242
ActiveWindow.ScrollColumn = 241
ActiveWindow.ScrollColumn = 240
ActiveWindow.ScrollColumn = 239
ActiveWindow.ScrollColumn = 237
ActiveWindow.ScrollColumn = 236
ActiveWindow.ScrollColumn = 235
ActiveWindow.ScrollColumn = 234
ActiveWindow.ScrollColumn = 232
ActiveWindow.ScrollColumn = 231
ActiveWindow.ScrollColumn = 230
ActiveWindow.ScrollColumn = 229
ActiveWindow.ScrollColumn = 227
ActiveWindow.ScrollColumn = 226
ActiveWindow.ScrollColumn = 224
ActiveWindow.ScrollColumn = 222
ActiveWindow.ScrollColumn = 219
ActiveWindow.ScrollColumn = 217
ActiveWindow.ScrollColumn = 215
ActiveWindow.ScrollColumn = 214
ActiveWindow.ScrollColumn = 211
ActiveWindow.ScrollColumn = 210
ActiveWindow.ScrollColumn = 208
ActiveWindow.ScrollColumn = 206
ActiveWindow.ScrollColumn = 205
ActiveWindow.ScrollColumn = 203
ActiveWindow.ScrollColumn = 201
ActiveWindow.ScrollColumn = 200
ActiveWindow.ScrollColumn = 199
ActiveWindow.ScrollColumn = 197
ActiveWindow.ScrollColumn = 196
ActiveWindow.ScrollColumn = 195
ActiveWindow.ScrollColumn = 194
ActiveWindow.ScrollColumn = 192
ActiveWindow.ScrollColumn = 191
ActiveWindow.ScrollColumn = 190
ActiveWindow.ScrollColumn = 188
ActiveWindow.ScrollColumn = 186
ActiveWindow.ScrollColumn = 183
ActiveWindow.ScrollColumn = 180
ActiveWindow.ScrollColumn = 176
ActiveWindow.ScrollColumn = 174
ActiveWindow.ScrollColumn = 172
ActiveWindow.ScrollColumn = 170
ActiveWindow.ScrollColumn = 168
ActiveWindow.ScrollColumn = 166
ActiveWindow.ScrollColumn = 163
ActiveWindow.ScrollColumn = 160
ActiveWindow.ScrollColumn = 158
ActiveWindow.ScrollColumn = 153
ActiveWindow.ScrollColumn = 149
ActiveWindow.ScrollColumn = 144
ActiveWindow.ScrollColumn = 139
ActiveWindow.ScrollColumn = 136
ActiveWindow.ScrollColumn = 132
ActiveWindow.ScrollColumn = 128
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 121
ActiveWindow.ScrollColumn = 116
ActiveWindow.ScrollColumn = 113
ActiveWindow.ScrollColumn = 109
ActiveWindow.ScrollColumn = 106
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 100
ActiveWindow.ScrollColumn = 98
ActiveWindow.ScrollColumn = 95
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 89
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 83
ActiveWindow.ScrollColumn = 81
ActiveWindow.ScrollColumn = 78
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 73
ActiveWindow.ScrollColumn = 71
ActiveWindow.ScrollColumn = 69
ActiveWindow.ScrollColumn = 67
ActiveWindow.ScrollColumn = 65
ActiveWindow.ScrollColumn = 63
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 59
ActiveWindow.ScrollColumn = 57
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 49
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.SmallScroll Down:=-39
Rows("2:200").Select
Selection.EntireRow.Hidden = True
ActiveWindow.SmallScroll Down:=45
End Sub

插入--模块4
Sub Macro4()
'
'
Cells.Select
Range("A101").Activate
Selection.EntireRow.Hidden = False
Range("D79").Select
End Sub

保存后退出Visudl Basic编辑器

然后右键点工具栏---自定义---命令--类别下选择宏---把左边的自定义按钮拖到上面菜单栏--指定宏,继续四个.
Macro4为返回宏.
4834550chenyong
展开查看全部 6 条讨论
精品应用推荐
新浪微博 新浪微博 天气通 天气通 淘宝特价版 淘宝特价版 UC浏览器 UC浏览器
相关问题

如何实现全国各地同事共用一个excel表格?

2962 浏览 10 回答

主要使用excel处理数据的话,财务人员学习VBA和python哪个比较好?

4522 浏览 10 回答

每天面对大量excel表,好麻烦,效率很低,有什么推荐的工具吗?

3308 浏览 9 回答

word excel 一打开文件就提示另存为。。。怎麽办???着急

29.1万 浏览 8 回答

EXCEL里面数据太多了,打开好慢,怎么办?

4671 浏览 8 回答

扩展阅读

DIY从入门到放弃:高端鼠标的回报率别忽视

评论 5

DIY从入门到放弃:高端鼠标的回报率别忽视

飞傲 BTR13解码耳放评测:小而美的便携性能机

评论 5

飞傲 BTR13解码耳放评测:小而美的便携性能机

农夫山泉再给大家出难题:喝自来水还是喝纯净水?

评论 91

农夫山泉再给大家出难题:喝自来水还是喝纯净水?

时尚灵巧高颜值 多屏办公一手抓 雷柏MT560多模无线鼠标体验评测

评论 2

时尚灵巧高颜值 多屏办公一手抓 雷柏MT560多模无线鼠标体验评测

为极限而生 佳能EOS R1旗舰微单相机深度评测

评论 11

为极限而生 佳能EOS R1旗舰微单相机深度评测
热门问题

求推荐一款笔记本。工科研究生用,便于随身携带。平时做科研,处理数据,查阅文献。不玩网游和单机,至多玩棋牌游戏和影音。喜欢摄影,需要修图。附加:纠结要不要带数字键盘区。预算最多8000。尽量便宜些。

1.2万 浏览 6 回答

求推荐一款笔记本。工科研究生用,便于随身携带。平时做科研,处理数据,查阅文献。不玩网游和单机,至多玩棋牌游戏和影音。喜欢摄影,需要修图。附加:纠结要不要带数字键盘区。预算最多8000。尽量便宜些。

荣耀Magic7 Pro

9739 浏览 1 回答

荣耀Magic7 Pro

256gSSD是否够用?打算买个笔记本,办公为主,查阅文献等。不玩大型游戏,至多玩一些棋牌类游戏和影音娱乐。手里有2T移动硬盘,但也想在笔记本上存少量的电影。平时玩单反,处理图片比较多。

2.3万 浏览 4 回答

256gSSD是否够用?打算买个笔记本,办公为主,查阅文献等。不玩大型游戏,至多玩一些棋牌类游戏和影音娱乐。手里有2T移动硬盘,但也想在笔记本上存少量的电影。平时玩单反,处理图片比较多。

肿么找回QQ浏览器历史记录

7296 浏览 6 回答

肿么找回QQ浏览器历史记录

手机在哪里登录192.168.1.1设定页面?

9448 浏览 7 回答

手机在哪里登录192.168.1.1设定页面?

魔兽世界LR怎么把鼠标右键设为自动射击

1.4万 浏览 4 回答

魔兽世界LR怎么把鼠标右键设为自动射击

海尔售后服务24小时服务热线

2005 浏览 5 回答

海尔售后服务24小时服务热线

快手网页版不用下载直接打开

2231 浏览 6 回答

快手网页版不用下载直接打开

免费韩国漫画在线观看的地址有么?

8045 浏览 4 回答

免费韩国漫画在线观看的地址有么?

艺术玻璃门打印机要价钱一台啊?哪家的比较好一点。

251 浏览 6 回答

艺术玻璃门打印机要价钱一台啊?哪家的比较好一点。
最新问答

酷派7295c_c00怎么进入双清方式?

8437 浏览 3 回答

酷派7295c_c00怎么进入双清方式?

USB3.0的电流是多少啊?

7709 浏览 4 回答

USB3.0的电流是多少啊?

pdf文件打开老显示“无法启动应用程序,应用程序正在更新”怎么回事

2101 浏览 8 回答

pdf文件打开老显示“无法启动应用程序,应用程序正在更新”怎么回事

怎么修改电脑默认的Administrator帐户的名称

9562 浏览 6 回答

怎么修改电脑默认的Administrator帐户的名称

魔兽世界单机版怎么增大天赋属性点,指令是什么?

9329 浏览 5 回答

魔兽世界单机版怎么增大天赋属性点,指令是什么?
举报
举报成功

经过核实后将会做出处理,感谢您为社区和谐做出贡献。

请选择删除原因
删除成功
确定推荐该回答?
推荐成功

更多频道

频道导航
辅助工具