Hi,
I'm not an expert in VBA but I'm trying to learn.
I have the following code ( I get inspired from other posts ) :
Sub WorkSheet_Activate()
Application.ScreenUpdating = False
Unprotect ""
Range("C8:AC28").Columns.AutoFit
Dim cl As Range, rtest As Range
Set rtest = Range("F28", Range("F28").End(xlToRight))
For Each cl In rtest
If Not cl.Value <> 0 Then
cl.EntireColumn.Hidden = True
End If
Next cl
Application.ScreenUpdating = True
Protect ""
End Sub
In this way the table becomes dynamic and Vertical page break is not fixed.
I need a code which will find vertical page break and it will paste copied A1:A3 ( from the same sheet ), next to vertical page break, and copied G4 and G5 in the fifth cell after page break.
Thank you for your help.
I'm not an expert in VBA but I'm trying to learn.
I have the following code ( I get inspired from other posts ) :
Sub WorkSheet_Activate()
Application.ScreenUpdating = False
Unprotect ""
Range("C8:AC28").Columns.AutoFit
Dim cl As Range, rtest As Range
Set rtest = Range("F28", Range("F28").End(xlToRight))
For Each cl In rtest
If Not cl.Value <> 0 Then
cl.EntireColumn.Hidden = True
End If
Next cl
Application.ScreenUpdating = True
Protect ""
End Sub
In this way the table becomes dynamic and Vertical page break is not fixed.
I need a code which will find vertical page break and it will paste copied A1:A3 ( from the same sheet ), next to vertical page break, and copied G4 and G5 in the fifth cell after page break.
Thank you for your help.