mscallisto
Technical User
Visio 2003 and Excel offers no predefined variable to display "path" in the header/footer.
In excel the following macro displays "path".
Whats the Visio way of saying "ActiveWorkbook.Path"
In excel the following macro displays "path".
Whats the Visio way of saying "ActiveWorkbook.Path"
Code:
Sub Set_HeadFoot()
Dim leftBracket, rightBracket As String
leftBracket = "["
rightBracket = "]"
With ActiveSheet.PageSetup
.LeftFooter = ActiveWorkbook.Path + "\" + ActiveWorkbook.Name
.CenterFooter = ""
.RightFooter = ""
.RightHeader = leftBracket & Cells(7, 7).Value & rightBracket
.CenterHeader = ""
.LeftHeader = ""
End With
End Sub