Excel VBA Column Hiding-Unhiding With Horizontal Form – 2

Excel VBA Hide - Unhide Columns With Check Boxes

          In the previous template, we were finding the last used column according to the first row of columns. The used code that to find last used column : 

lst_column = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column

          Any value in the first row may not always be . Values may be in bottom rows.Therefore, we created the following code to find last used column in this template :

lst_column = ActiveSheet.UsedRange.Columns(ActiveSheet.UsedRange.Columns.Count).Column

excel vba hide column

   The result is great 👍
excel sütun gizle

No comments:

Post a Comment