excel显示问题如何使所选单元格本身
打开VB编辑器,展开Microsoft Excel夹,双击Sheet1,写入
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
模块 l ActiveCell。 Row, ActiveCell。Column
End Sub
双击ThisWorkBOOK,写入
Private Sub Workbook_Open()
Sheet1。Cells。Interior。 ColorIndex = xlNone
End Sub
点工具栏-模块,写入
Dim pr, pc As Integer
Public Sub col(r, ...全部
打开VB编辑器,展开Microsoft Excel夹,双击Sheet1,写入
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
模块 l ActiveCell。
Row, ActiveCell。Column
End Sub
双击ThisWorkBOOK,写入
Private Sub Workbook_Open()
Sheet1。Cells。Interior。
ColorIndex = xlNone
End Sub
点工具栏-模块,写入
Dim pr, pc As Integer
Public Sub col(r, c)
On Error Resume Next
ActiveSheet。
Cells(pr, pc)。EntireColumn。Interior。ColorIndex = xlNone
ActiveSheet。Cells(pr, pc)。EntireRow。Interior。
ColorIndex = xlNone
ActiveSheet。Cells(r, c)。EntireColumn。Interior。ColorIndex = 6
ActiveSheet。Cells(r, c)。
EntireRow。Interior。ColorIndex = 6
pc = c
pr = r
End Sub
完成表1设置,上传刚完成表格,供大家参考。收起