This is the code that I have so far:
Dim cn As String
cn = InputBox("Please Enter Slide Title", "Slide Title")
If cn <> "" Then
Range("S2").Value = cn
End If
Range("S2").Select
ActiveCell.Copy
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = _
"&""Times New Roman,Regular""&24"Global Economic Outlook""
Is there any way i can get "Global Economic Outlook" simply to be the
contents of cell S2? Will the code that you wrote down do the trick?
Thanks.
"Don Guillett" wrote:
> Instead of a cell you could use
>
> myheader=inputbox("Enter this months header")
> range("a1").value=myheader
>
> or a simple formula using your cell idea
> =sheet1!c1
>
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "Stonewall" <(E-Mail Removed)> wrote in message
> news:50ED7849-15F5-4051-84CB-(E-Mail Removed)...
> > Hi,
> >
> > I am trying to create a macro to insert a header into my worksheets. I
> > would like to be able to enter what the header is to say in a cell and
> > create
> > a macro to copy those contents into the header portion to save me some
> > time.
> > The catch is that the titles that i need to type in will change from time
> > to
> > time, so the macro must be able to copy and paste dynamically. For
> > example
> > this month the sheet might say "Global Economic Outlook" but next quarter
> > it
> > might say, "Affects of Oil Demand". How can I get a macro to enter the
> > different data from the contents of a cell?
> >
> > Thanks,
> >
> > Dan
>
>