当前位置:网站首页>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表格中选中单元格出现十字带阴影的选中效果,希望能够帮到有需要的人,不妨点个赞。
边栏推荐
- Regular and common formulas
- Eight sorting summaries
- CTF record
- 念念不忘,必有回响 | 悬镜诚邀您参与OpenSCA用户有奖调研
- Always report errors when connecting to MySQL database
- Precautions for scalable contract solution based on openzeppelin
- CentOS8之mysql基本用法
- Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
- Jinshanyun - 2023 Summer Internship
- Is bond fund safe? Does the bond buying foundation lose principal?
猜你喜欢

Compilation errors and printout garbled problems caused by Chinese content in vs2019 code

2022年4月17日五心红娘团队收获双份喜报

What are the software product management systems? Inventory of 12 best product management tools

Amazon cloud technology community builder application window opens

【IDEA】使用插件一键逆向生成代码

PowerBI中导出数据方法汇总

念念不忘,必有回响 | 悬镜诚邀您参与OpenSCA用户有奖调研

A white hole formed by antineutrons produced by particle accelerators

2022 love analysis · panoramic report of digital manufacturers of state-owned enterprises

Principle of scalable contract delegatecall
随机推荐
TIPC Getting Started6
高德根据轨迹画线
可升级合约的原理-DelegateCall
Implementation of six singleton modes
tidb-dm报警DM_sync_process_exists_with_error排查
揭露数据不一致的利器 —— 实时核对系统
Internship report skywalking distributed link tracking?
PowerBI中导出数据方法汇总
Some things configured from ros1 to ros2
Writing contract test cases based on hardhat
解决uniapp列表快速滑动页面数据空白问题
C# 文件与文件夹操作
Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
ros缺少xacro的包
MySQL comparison operator in problem solving
可昇級合約的原理-DelegateCall
Eight sorting summaries
八大排序汇总
What are the methods of adding elements to arrays in JS
Multi line display and single line display of tqdm