Thread: Page x of y
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Henrik Henrik is offline
external usenet poster
 
Posts: 43
Default Page x of y

Hi,

I have a macro with the following patch of code (except for the stuff in the
bracket).
However, I want the code to insert page x of y into the right footer. I
figure it will go where the bracket is, but I am not certain how to program
this. Your help is much appreciated.

If Range("c_pageswitch") = True Then
Worksheets(ws_name).PageSetup.RightFooter = [x of y]
Else
Worksheets(ws_name).PageSetup.RightFooter = ""
End If