#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default page set up

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default page set up

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"

"SteveDB1" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default page set up

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.





"JLGWhiz" wrote:

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"

"SteveDB1" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default page set up

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.


"SteveDB1" wrote:

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.





"JLGWhiz" wrote:

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"

"SteveDB1" wrote:

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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default page set up

Maybe this site will help you to understand the Header and Footer process a
little better.

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

"SteveDB1" wrote:

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.


"SteveDB1" wrote:

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.





"JLGWhiz" wrote:

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"

"SteveDB1" wrote:

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.

Reply
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
Saving Excel 2010 files as web page or single file web page Joe Artis Excel Discussion (Misc queries) 3 April 29th 23 03:44 AM
Format page number in excel footer to start at a specific page # straitctrydncr Excel Discussion (Misc queries) 4 April 28th 23 07:45 PM
How do I do page breaks when view menu doesnt page break preview HeatherF55 Excel Discussion (Misc queries) 0 September 21st 07 04:24 AM
save page ,clear page, reuse same page dave Excel Programming 1 June 6th 07 06:01 AM
excel fit to 1 page shows 1 page but not all data is on that page Jans Excel Programming 1 September 2nd 04 01:49 AM


All times are GMT +1. The time now is 07:08 AM.

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

About Us

"It's about Microsoft Excel"