Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

page set up

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SteveDB1 - 28 May 2008 23:53 GMT
Hi all.
I'm interested in making a macro that will do my "page set up"
configurations for me.
While I already have made one through manual record, and I've modified parts
of it, I'm left with 3 elements that I do not know the coding for, or if it's
even possible.
In my footer, there are 3 panes.
The left pane I hard-wire the date that I actually work the file.
In my center pane, I place the file name-- but not &[file]. Again, I
"hard-wire" the name. While I can hear a few comments stating that it'd be
just as easy to use &[file], we try to avoid that here, as we've had troubles
with it in the past, and not enough of us would pay enough attention to catch
it beforehand.
What we have in the right pane works as is, so that's unimportant as we're
satisfied.
So, my question-- with the footer, can I do an "application.inputbox()" for
the two panes-- left, and center?
If so, how would I go about coding something like this?
I just need to better understand that part, as mentioned, I've already got
the rest of it done, and it works quite well.
Thank you.
Best.
JLGWhiz - 29 May 2008 01:16 GMT
You can use the InputBox function to crate a variable and then use that
variable in the footer.  Create the variable:

myVar = InputBox("Enter something", "Enter")

The to put it in the left footer:

Sheets("SheetName").PageSetup.LeftFooter = "&myVar"

> Hi all.
> I'm interested in making a macro that will do my "page set up"
[quoted text clipped - 18 lines]
> Thank you.
> Best.
SteveDB1 - 29 May 2008 05:30 GMT
JLG,
Thank you.
I only have one last problem.

.LeftFooter = "&""Arial,Bold""&14" & MyDateVar

For some reason that I don't understand, this gives the font size at 145
instead of 14.
I thought it was the placement of the quotes, and replaced them. It did not
work. It just printed out MyDateVar instead. So I've removed the quotes.

I also reduced the size of the font to see what it input, and found that it
took the month value of my m/dd/yyyy formatted date and used that as the last
value of the font size. I.e., instead of 5/28/2008, it only input /28/2008

How can I prevent that?
Again, thanks for your help.

> You can use the InputBox function to crate a variable and then use that
> variable in the footer.  Create the variable:
[quoted text clipped - 27 lines]
> > Thank you.
> > Best.
SteveDB1 - 29 May 2008 17:06 GMT
Ok.
I figured out my issue.
I had to place a space after the "&14", i.e., "&14 ".
While it places a space before my date variable, it still works.
Thanks again for the help you provided yesterday.
Best.


> JLG,
> Thank you.
[quoted text clipped - 45 lines]
> > > Thank you.
> > > Best.
JLGWhiz - 29 May 2008 22:17 GMT
Maybe this site will help you to understand the Header and Footer process a
little better.

http://www.cpearson.com/excel/headfoot.htm

> Ok.
> I figured out my issue.
[quoted text clipped - 53 lines]
> > > > Thank you.
> > > > Best.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.