excel窗口总在最前面该怎么设置?
时间:2023-05-26 18:36:16
excel窗口总在最前面该怎么设置?想让excel的窗口始终显示在最前面,不被其他窗口挡住,该怎么设置呢?今天分享利用VBA编辑器实现excel窗口最前面的方法,需要的朋友可以参考下
在使用电脑办公的时候,经常会同时打开多个软件。比如同时使用excel和AutoCAD,这时候需要按照excel的内容在AutoCAD上面进行画图。将AutoCAD最大化,这时候如果还想看excel就只能从任务栏点击excel图标,这样excel窗口才会弹出。这里就教教大家,怎么不用这么麻烦的操作,一直把excel保持在窗口最前面。
1、首先打开VBA编辑器,按住ALT+F11按钮,或者点击“开发者工具”下面的“Visual Basic”选项,进入VBA编辑器
2、点击菜单栏的“插入”——“模块”,弹出代码窗口。
3、在窗口中粘贴下列代码
复制内容到剪贴板
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _ ByVal hwndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _ ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const HWND_TOPMOST = -1Const HWND_NOTOPMOST = -2Const SWP_NOSIZE = &H1Const SWP_NOMOVE = &H2
Sub 窗口总在最前面()SetWindowPos Application.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVEEnd SubSub 恢复()SetWindowPos Application.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVEEnd Sub
4、关闭VBA编辑器
5、在EXCEL工作界面中按快捷键ALT+F8,或者点击菜单栏“视图”——“宏”,弹出宏窗口。选择“窗口总在最前”,然后点击“执行”。这样,EXCEL的窗口就会一直保持在最前面了
6、如果不想EXCEL窗口保持在最前,那就按上一步操作,选择“恢复”——“执行”,这样窗口就不会在最前面了。
相关推荐:
excel2007/2010怎么设置不同文档窗口分离显示?
两个excel文档怎么分开显示?让excel在两个窗口分开显示的方法
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
6个繁华城市景象调色lr预设
![](https://img.aspxhome.com/file/2023/8/a205798_0s.jpeg)
Win10家庭版怎么使用组策略?
![](https://img.aspxhome.com/file/2023/26/a220676_0s.png)
Excel表格中出现数字变成e+17的解决方法
你知道自己Win10专业版电脑硬盘容量大小吗?
![](https://img.aspxhome.com/file/2023/3/a296767_0s.jpg)
XP系统通过Twain扫描提示成像设备无法初始化的解决方法
![](https://img.aspxhome.com/file/2023/28/a245059_0s.png)
什么安卓手机非常受欢迎?2021年3月安卓好评手机排行榜天梯图
![](https://img.aspxhome.com/file/2023/6/a322655_0s.png)
win11最新更新补丁KB5004252的安装方法
![](https://img.aspxhome.com/file/2023/4/a310962_0s.png)
如何使用word制作数据分析图
![](https://img.aspxhome.com/file/2023/0/19440_0s.jpg)
快速解决Win7系统下不能玩战地2的方法
![](https://img.aspxhome.com/file/2023/4/a305741_0s.jpg)
kavbootc.sys是什么 win7进入系统失败提示kavbootc.sys丢失的解决方法
![](https://img.aspxhome.com/file/2023/28/a246607_0s.png)
Win10下载软件被阻止怎么办?Win10下载软件被阻止的解决方法
![](https://img.aspxhome.com/file/2023/26/a219938_0s.png)
乐云记事怎么创建笔记本?乐云记事创建笔记本的方法
![](https://img.aspxhome.com/file/2023/8/a334541_0s.jpg)
iOS12公测版、开发者测试版、正式版有什么区别?
![](https://img.aspxhome.com/file/2023/5/a199925_0s.jpg)
syncthing怎么用?syncthing中文使用教程
![](https://img.aspxhome.com/file/2023/30/a270407_0s.jpg)
Win10累积更新KB4017100、KB4017099、KB4016754补丁下载地址(附更新内容)
![](https://img.aspxhome.com/file/2023/29/a260616_0s.jpg)
电脑win7蓝牙耳机怎么连接?win7连接蓝牙耳机操作教程
![](https://img.aspxhome.com/file/2023/28/a240511_0s.jpg)
Win10重装之后没有网络处理方法
![](https://img.aspxhome.com/file/2023/1/a282018_0s.png)
excel表格输入长数字会乱码怎么办
![](https://img.aspxhome.com/file/2023/4/a304653_0s.png)
如何从WSL中删除Linux发行版?三种方法分享给你!
![](https://img.aspxhome.com/file/2023/30/a267525_0s.jpg)
主板电池没电了会开不了机吗?怎么判断主板电池没电?
![](https://img.aspxhome.com/file/2023/6/a323334_0s.jpg)