当前位置:网站首页>The selected cells in Excel form have the selection effect of cross shading
The selected cells in Excel form have the selection effect of cross shading
2022-07-02 11:44:00 【Get up in the morning and buy soymilk】
be based on VBA Realization Excel Cross highlight
I need this function by chance , Microsoft EXCEL The table realizes the selection effect of cross shading in the selected cells ;
Found some ways , Make detailed records again , See this article to basically solve the problems mentioned in the title .
One 、 Format requirements
First , The file format must be .xlsm Format , If not in this format , The effect of setting is turning off excel Reopen the form after , The probability will fail .
Two 、 Specific steps
1**、 open vbe Editor **
Method :ALT+F11
2、 Double click on the left thisworkbook label , And paste the code
The code is as follows :
' Note that this method will remove the existing background color of the cell
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Target.EntireRow.Interior.Color = RGB(230, 250, 230) ' Row style
Target.EntireColumn.Interior.Color = RGB(230, 250, 230) ' Column style
Target.Interior.Color = RGB(255, 255, 255) ' Cell style
End Sub
Then save the step .ctrl+S( Pop up prompt Click : yes )
3、 Realization effect , Achieve a goal ;
such , Then realized excel The selected cells in the table have the selection effect of cross shading , Hope to be able to help people in need , Give it a like .
边栏推荐
猜你喜欢
RPA advanced (II) uipath application practice
C#多维数组的属性获取方法及操作注意
PYQT5+openCV项目实战:微循环仪图片、视频记录和人工对比软件(附源码)
Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
CentOS8之mysql基本用法
基于Hardhat和Openzeppelin开发可升级合约(二)
How to Create a Beautiful Plots in R with Summary Statistics Labels
[cloud native] 2.5 kubernetes core practice (Part 2)
电脑无缘无故黑屏,无法调节亮度。
Multi line display and single line display of tqdm
随机推荐
tidb-dm报警DM_sync_process_exists_with_error排查
揭露数据不一致的利器 —— 实时核对系统
Wechat applet uses Baidu API to achieve plant recognition
QT获取某个日期是第几周
PHP tea sales and shopping online store
从ros1到ros2配置的一些东西
Gaode draws lines according to the track
C # method of obtaining a unique identification number (ID) based on the current time
Redis超出最大内存错误OOM command not allowed when used memory > 'maxmemory'
制造业数字化转型和精益生产什么关系
亚马逊云科技 Community Builder 申请窗口开启
[cloud native] 2.5 kubernetes core practice (Part 2)
ROS lacks catkin_ pkg
Bedtools tutorial
抖音海外版TikTok:正与拜登政府敲定最终数据安全协议
程序员成长第六篇:如何选择公司?
电脑无缘无故黑屏,无法调节亮度。
Native method merge word
enumrate的start属性的坑
Multi line display and single line display of tqdm