I want to add a line, lh margin to rh margin, immediately before the footer. Can someone help me, please, with the VBA code to do this. This is my VBA code to add a footer to a worksheet.
Sub AddFooter() Dim Response As Integer Application.ScreenUpdating = False With ActiveSheet.PageSetup .LeftFooter = "&8&F" .CenterFooter = "&8&A" Response = MsgBox("Do you want to maintain today's date as static ? ", vbYesNo _ + vbQuestion) If Response = vbYes Then .RightFooter = "&8 " & Format(Now, "dd/mm/yy") Else .RightFooter = "&8" & "&D" End If End With Application.ScreenUpdating = True End Sub