Archive for April, 2008
Monday, April 14th, 2008 417 views
About halfway down the Outlook page, there is some VBA code for opening an Excel workbook attached to an email, running a macro on it, then cleaning up and moving the email to another folder.
Here is some more sample code to make your macro even more intelligent. This code opens ...
Posted in Excel, Outlook, VBA, automation | No Comments »
Tuesday, April 8th, 2008 6 views
As you may have noticed, I decided to update the blog, because it was getting hard to navigate. The color scheme was just bringing me down, so I spent about 4-5 hours changing it. That might seem like a lot of time, but I'm a perfectionist so once I start ...
Posted in Excel, UDF, VBA, administrative | No Comments »
Monday, April 7th, 2008 167 views
Here's a series of short UDFs that will return the page headers and footers for the active worksheet.
[vba]
Function GetLeftHeader()
GetLeftHeader = ActiveSheet.PageSetup.LeftHeader
End Function
[/vba]
[vba]
Function GetCenterHeader()
GetCenterHeader = ActiveSheet.PageSetup.CenterHeader
End Function
[/vba]
[vba]
Function GetRightHeader()
GetRightHeader = ActiveSheet.PageSetup.RightHeader
End Function
[/vba]
[vba]
Function GetLeftFooter()
GetLeftFooter = ActiveSheet.PageSetup.LeftFooter
End Function
[/vba]
[vba]
Function GetCenterFooter()
GetCenterFooter = ActiveSheet.PageSetup.CenterFooter
End Function
[/vba]
[vba]
Function GetRightFooter()
...
Posted in Excel, UDF, VBA | No Comments »
Monday, April 7th, 2008 447 views
If you want to programmatically set the "Rows to Repeat At Top" option on the Sheet tab in Excel's Page Setup dialog box, here are two ways to do it.
If you already know what range you want, you could use this code:
[vba]
ActiveSheet.PageSetup.PrintTitleRows = "$1:$1"
[/vba]
This would set row 1 (which would ...
Posted in Excel, VBA | 1 Comment »
Friday, April 4th, 2008 5 views
I was browsing Jon Peltier's blog and found a link to the Excel User Conference. It's being held in Atlantic City which is only a couple hours' drive from my house, so I will be attending. And as soon as I save the money to pay the attendance fees, I'll ...
Posted in Excel | 2 Comments »