DIALOG BOX DEFAULT LABELS
You will need to add a global variable for each of the inputs that you would
like to have a default for. To do this place a "Public" statement at the top
of the module (before any "Sub" or "Function" statements.
Public strPeriod
Sub Blah()
Dim Period As String
Period = InputBox("BlahBlah",,strPeriod)
strPeriod = Period
End Sub
--
Charles Chickering
"A good example is twice the value of good advice."
" wrote:
How can I modify this macro to default to the last label typed for
this input box? I only need to be able to override it, so I don't
need to re type it every time I run it.
Sub header()
Period = InputBox("What Period?")
DivName = InputBox("What Division?")
title1 = InputBox("CENTER TITLE ROW 1")
title2 = InputBox("CENTER TITLE ROW 2")
With ActiveSheet.PageSetup
.LeftHeader = Period & Chr(10) & DivName
.CenterHeader = title1 & Chr(10) & title2
.RightHeader = Date
.RightFooter = page
End With
End Sub
Thanks,
|