Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Excel 2010 files as web page or single file web page | Excel Discussion (Misc queries) | |||
Format page number in excel footer to start at a specific page # | Excel Discussion (Misc queries) | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
save page ,clear page, reuse same page | Excel Programming | |||
excel fit to 1 page shows 1 page but not all data is on that page | Excel Programming |