How would I add a horizontal line at the top of this footer? I tried adding "String(100, "_") &" to the beginning of the .LeftFooter but it's not working.
Thanks for helping... Here's the full code.
Sub SetFooter()
' custom footer
Dim wb As Workbook
Dim wsProfile As Worksheet
Dim strCompany As String
Dim strAddress As String
Dim strCity As String
Dim strZip As String
Dim strContact As String
Dim strEmail As String
Dim strTel As String
Set wb = ThisWorkbook
Set wsProfile = wb.Sheets("Employer Profile")
strCompany= wsProfile.Range("pCompany").Value
strAddress = wsProfile.Range("pAddress").Value
strCity = wsProfile.Range("pCity").Value
strZip = wsProfile.Range("pZip").Value
strContact = wsProfile.Range("pContact").Value
strEmail = wsProfile.Range("pEmail").Value
strTel = Format(wsProfile.Range("pTel").Value, "###"".""###"".""####")
With ActiveSheet.PageSetup
.LeftFooter = _
.RightFooter = _
End With
End Sub
Thanks for helping... Here's the full code.
Sub SetFooter()
' custom footer
Dim wb As Workbook
Dim wsProfile As Worksheet
Dim strCompany As String
Dim strAddress As String
Dim strCity As String
Dim strZip As String
Dim strContact As String
Dim strEmail As String
Dim strTel As String
Set wb = ThisWorkbook
Set wsProfile = wb.Sheets("Employer Profile")
strCompany= wsProfile.Range("pCompany").Value
strAddress = wsProfile.Range("pAddress").Value
strCity = wsProfile.Range("pCity").Value
strZip = wsProfile.Range("pZip").Value
strContact = wsProfile.Range("pContact").Value
strEmail = wsProfile.Range("pEmail").Value
strTel = Format(wsProfile.Range("pTel").Value, "###"".""###"".""####")
With ActiveSheet.PageSetup
.LeftFooter = _
' tried "String(100,"_") & "&08" & Space(10) & "&B" & strCompany & "&B" & Chr(10) & _" as next line but it does not work
"&08" & Space(10) & "&B" & strCompany& "&B" & Chr(10) & _
Space(10) & strAddress & Chr(10) & _
Space(10) & strCity & ", TX " & strZip & "&08"
.CenterFooter = "".RightFooter = _
"&08" & strContact & Chr(10) & _
strEmail & Chr(10) & _
strTel & "&08"
End With
End Sub