vba指定单元格录入函数并向下填充(VBA实现冻结窗格并返回行列号)

冻结窗格的三种(冻结窗格、冻结首行、冻结首列)

vba指定单元格录入函数并向下填充(VBA实现冻结窗格并返回行列号)(1)

vba指定单元格录入函数并向下填充(VBA实现冻结窗格并返回行列号)(2)

vba指定单元格录入函数并向下填充(VBA实现冻结窗格并返回行列号)(3)

vba指定单元格录入函数并向下填充(VBA实现冻结窗格并返回行列号)(4)

vba指定单元格录入函数并向下填充(VBA实现冻结窗格并返回行列号)(5)

冻结窗格的三种(冻结窗格、冻结首行、冻结首列)代码如果

Sub 冻结窗格()

ActiveWindow.FreezePanes = True

MsgBox "冻结单元格地址为:" & Replace(ActiveSheet.Cells(ActiveWindow.SplitRow 1, ActiveWindow.SplitColumn 1).Address, "$", "")

End Sub

Sub 冻结首行窗格()

ActiveWindow.SplitColumn = 0

ActiveWindow.SplitRow = 1

ActiveWindow.FreezePanes = True

MsgBox "冻结的为第" & ActiveWindow.SplitRow & "行"

End Sub

Sub 冻结首列窗格()

With ActiveWindow

.SplitColumn = 1

.SplitRow = 0

End With

ActiveWindow.FreezePanes = True

MsgBox "冻结的位置为第:" & ActiveWindow.SplitColumn & "列"

End Sub

Sub 取消冻结窗格()

With ActiveWindow

.SplitColumn = 0

.SplitRow = 0

End With

ActiveWindow.FreezePanes = False

End Sub

Sub 冻结窗格地址()

If ActiveWindow.FreezePanes Then

MsgBox "冻结单元格地址为:" & Replace(ActiveSheet.Cells(ActiveWindow.SplitRow 1, ActiveWindow.SplitColumn 1).Address, "$", "")

Else

MsgBox "未冻结单元格!"

End If

End Sub

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页