您现在的位置是:首页 > Excel技巧>Excel实现仿放大镜

Excel 放大镜-Excel实现仿放大镜

发布于2022-04-150人已围观

Excel实现仿放大镜功能。点击单元格,自动放大单元格的内容。

通过调整宏代码,可以设置单元格内容放大的倍数,放大的背景等。


作者:Excel小子-Office中国

Excel 放大镜

 


Excel仿放大镜操作动画

Excel 放大镜

 



Excel仿放大镜详细VBA代码:

        Private Sub Worksheet_SelectionChange(ByVal Target As Range)

            Dim a As Shape

            x = Target(1).Row

            y = Target(1).Column

            If boo = False Then

                ActiveSheet.Shapes.AddShape(msoShapeRoundedRectangle, Target.Top, Target.Left + Target.Width + 20, 250, 130).Select

                Selection.Name = "MyLabel"

            End If

            ActiveSheet.Shapes("MyLabel").Select

            Selection.Formula = Target.Address

            Selection.Font.Size = Target(1).Font.Size + 30

            Selection.Top = Target.Top - 30

            Selection.Left = Target.Left + Target.Width + 20

            Selection.ShapeRange.Line.Visible = msoFalse

            With Selection.ShapeRange.Fill

                .Visible = msoTrue

                .ForeColor.ObjectThemeColor = msoThemeColorBackground1

                .ForeColor.TintAndShade = 0

                .ForeColor.Brightness = 0

                .Transparency = 0

                .Solid

            End With

            Target.Select

            boo = True

        End Sub


点击加入群:OFFICE3658 结识Excel大神
学好Excel,效率成倍提高,薪水稳步增长,职位快速提升
每天一个源创技巧,如觉得有用,请点上面 关注。更重要手机转发分享


如喜欢此技巧,手机右上角点开,分享到QQ空间,方便自己以后看




相关文章

文章评论

表情

共0条评论
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~

标签云

站长特荐