excel利用VBA选择活动单元格所在的数组区域
时间:2022-12-09 21:25:02
如果在某个区域中输入了相同的数组公式,选择其中某一部分单元格进行修改时,Excel将提示“不能更改数组的某一部分”,这时需要选择全部的数组进行修改。当活动单元格在数组区域中时,可以用下面的VBA代码选择当前整个数组区域,并且在状态栏中给出提示信息。
Public Sub SelectArray()
Dim Msg As String
On Error GoTo DispOnSstatusbar
Msg = "选择的单元格不在数组区域中。"
ActiveCell.CurrentArray.Select
Msg = "已选择数组区域:" & Selection.Address
DispOnSstatusbar:
Application.StatusBar = Msg
End Sub
标签:区域,单元格,数组,选择,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
微软Win10系统被指存在“不干净”的行为 用户吐槽
2023-10-04 06:02:03
![](https://img.aspxhome.com/file/2023/4/a312233_0s.jpg)
Win10系统livekernelreports可以删除吗?
2022-09-10 06:08:20
![](https://img.aspxhome.com/file/2023/5/a314925_0s.jpg)
excel表格设置每行带表头的教程
2022-08-14 14:13:55
win7本地连接不见了怎么办_win7本地连接不见了恢复办法
2022-09-23 11:12:41
![](https://img.aspxhome.com/file/2023/5/a315824_0s.jpg)
Win10频繁弹出正在安装新键盘 Win10提示正在安装新键盘怎么回事
2022-07-12 04:28:43
![](https://img.aspxhome.com/file/2023/30/a270020_0s.jpg)
基于Win11 微软Windows Server LTSC预览版VNext 25217的ISO镜像开放下载
2022-10-04 04:09:36
![](https://img.aspxhome.com/file/2023/27/a238977_0s.jpg)
搜狗输入法怎么导入本地中文词库?
2022-09-07 14:55:44
![](https://img.aspxhome.com/file/2023/30/a269006_0s.jpg)
MacBook Air可以安装Windows11吗?MacBook Air安装Win11的方法
2023-04-19 11:59:24
![](https://img.aspxhome.com/file/2023/1/a281806_0s.jpg)
PPT如何将自动播放改为手动播放
2022-02-28 22:25:27
![](https://img.aspxhome.com/file/2023/10/a350787_0s.png)
wps表格怎么设置自动填充月份?
2023-06-25 03:26:33
![](https://img.aspxhome.com/file/2023/8/a166318_0s.png)
Windows11更新设置界面打不开怎么办?
2022-10-30 20:16:17
![](https://img.aspxhome.com/file/2023/27/a237122_0s.png)
将PPT中的图片制作成十字绣效果的方法
2023-09-20 19:02:10
Win10内置管理员帐户Administrator无法打开应用的解决方法
2022-05-15 21:13:27
![](https://img.aspxhome.com/file/2023/30/a263527_0s.png)
Win7怎么升级Win11?win7跳过硬件要求升级Win11方法
2022-07-10 03:43:06
![](https://img.aspxhome.com/file/2023/26/a228078_0s.png)
excel 换算得分的50种方法公式
2022-03-01 03:14:59
百度网盘一直提示网络异常的解决方法
2022-07-05 22:45:45
![](https://img.aspxhome.com/file/2023/6/a324160_0s.jpg)
Mac如何开启护眼模式?夜览功能是什么?
2022-06-30 00:34:55
![](https://img.aspxhome.com/file/2023/8/a212048_0s.png)
Win10系统源文件怎么恢复?Win10 1909系统源文件恢复教程
2023-11-15 04:52:03
![](https://img.aspxhome.com/file/2023/8/48788_0s.jpg)
win10系统开始菜单打不开解决方法
2022-11-04 18:31:48
![](https://img.aspxhome.com/file/2023/3/a296902_0s.png)
word表格中的文字怎么都堆在右侧了?
2023-05-14 06:31:22
![](https://img.aspxhome.com/file/2023/6/32436_0s.gif)