LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default variables in footers; how to prompt user for input within macro

I use the following macro at work all the time. (I put BLAH in place
of real work data.)

Now other people want to use my macros. The right footer contains an X

which changes according to whatever document gets worked on. I just go

into the macro and put what I want in there before I run it. It's a
variable and could be anything (TOC-page, Appendix A-page, III-A-page,
etc.)

Who knows how to make a dialog box that will prompt the user for
whatever data in place of the X? Telling people how to go into VBA
(Alt F11) and find the X and change it isn't working out quite well.

Sub ClearAllHeadersFooters_ApplyBLAHBLAH_AllWorksheets _XDashPageNum()
'
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
End With
Dim s As Worksheet
Application.ScreenUpdating = False
For Each s In ActiveWorkbook.Worksheets
With s.PageSetup
.LeftHeader = "&""Arial Narrow,Italic""&10" & Chr(10) & "BLAH"
.CenterHeader = "BLAH"
.RightHeader = "&""Arial Narrow,Italic""&10BLAH" & Chr(10) &
"BLAH"
.LeftFooter = _
"&""Arial,Bold""&10BLAH" & Chr(10) &
"&""Arial,Regular""&10BLAH"
.CenterFooter = ""
.RightFooter = _
"&""Times New Roman,Regular""&11X-&P" & Chr(10) & "&""Arial
Narrow,Italic""&7BLAH"
End With
Next s
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prompt user to input data (pop-up box) Shags Excel Discussion (Misc queries) 2 January 13th 09 06:05 AM
Can Excell prompt for user input... Will Excel Discussion (Misc queries) 0 April 12th 07 10:36 PM
Prompt user for input and utilize that input ninner Excel Worksheet Functions 2 March 28th 07 09:44 PM
Having a Macro Prompt Me For Input carl Excel Worksheet Functions 3 January 13th 06 02:24 PM
Prompt For User Mouse Input In Macro? oBis Excel Programming 0 May 6th 04 02:50 PM


All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"