当前位置:网站首页>excel表格中选中单元格出现十字带阴影的选中效果
excel表格中选中单元格出现十字带阴影的选中效果
2022-07-02 09:38:00 【早上起床买豆浆】
基于VBA实现Excel十字交叉高亮显示
偶然需要到这个功能,微软的EXCEL表格实现选中单元格出现十字带阴影的选中效果;
找了一些方法,再次做详细记录,看此文基本解决标题所述问题。
一、格式要求
首先,文件格式必须为.xlsm格式,如果不是该格式,设置的效果在关闭excel表格后重新打开,大概率会失效。
二、具体步骤
1**、 打开vbe编辑器**
方法:ALT+F11
2、双击左侧thisworkbook标签,并粘贴代码
代码如下:
'注意此方法会去掉单元格已有的背景色
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Target.EntireRow.Interior.Color = RGB(230, 250, 230) '行样式
Target.EntireColumn.Interior.Color = RGB(230, 250, 230) '列样式
Target.Interior.Color = RGB(255, 255, 255) '单元格样式
End Sub
然后保存该步骤。ctrl+S(弹框提示点击: 是)
3、实现效果,达到目的;
如此,便实现了excel表格中选中单元格出现十字带阴影的选中效果,希望能够帮到有需要的人,不妨点个赞。
边栏推荐
- Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
- Astparser parsing class files with enum enumeration methods
- spritejs
- Introduction to interface debugging tools
- From the perspective of attack surface, see the practice of zero trust scheme of Xinchuang
- Liftover for genome coordinate conversion
- Map set assignment to database
- Regular and common formulas
- MySQL比较运算符IN问题求解
- 三.芯片啟動和時鐘系統
猜你喜欢

Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic

Verilog 和VHDL有符号数和无符号数相关运算

【云原生】2.5 Kubernetes 核心实战(下)

CTF record

揭露数据不一致的利器 —— 实时核对系统

webauthn——官方开发文档

Mmrotate rotation target detection framework usage record

map集合赋值到数据库

Summary of data export methods in powerbi

Skills of PLC recorder in quickly monitoring multiple PLC bits
随机推荐
念念不忘,必有回响 | 悬镜诚邀您参与OpenSCA用户有奖调研
基于 Openzeppelin 的可升级合约解决方案的注意事项
可昇級合約的原理-DelegateCall
由粒子加速器产生的反中子形成的白洞
Resources reads 2D texture and converts it to PNG format
Tick Data and Resampling
liftOver进行基因组坐标转换
Precautions for scalable contract solution based on openzeppelin
Is it safe to open a stock account online? I'm a novice, please guide me
Wechat applet uses Baidu API to achieve plant recognition
II Stm32f407 chip GPIO programming, register operation, library function operation and bit segment operation
Astparser parsing class files with enum enumeration methods
Native method merge word
TIPC Service and Topology Tracking4
CTF record
Implementation of six singleton modes
Resources读取2d纹理 转换为png格式
RPA进阶(二)Uipath应用实践
Order by injection
Principe du contrat évolutif - delegatecall