Change Header/Footer w/ Worksheet Option Buttons

I have a workbook named QUOTES that uses a referenced add-in workbook named 
Add-In which contains all code to manipulate QUOTES.  I have 2 option buttons 
on Sheet1 in QUOTES.  One named optAdTech and the other optFormetco.  These 
option buttons represent two different companies.  I need to change the 
Header and Footer information to whichever company option button is true when 
the quote is printed in the BeforePrint Event in QUOTES.  

What is the best way to do this?  Note:  Left Header is company logo, Right 
Header is company address, Center Footer is text.

Would it be possible to save the AdTech's header/footer information and 
Formetco's header/footer information in the Add-In and then apply it in 
QUOTES?  For example:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

    Select Case True
    
        Case optAdTech
            ' call AdTech header/footer data from add-in
        
        Case optFormetco
            ' call Formetco header/footer data from add-in
        
    End Select
    
End Sub

-- 
Cheers,
Ryan
0
Utf
12/8/2009 3:36:01 PM
excel.programming 6508 articles. 2 followers. Follow

1 Replies
831 Views

Similar Articles

[PageSpeed] 53

Check your other post.

Ryan H wrote:
> 
> I have a workbook named QUOTES that uses a referenced add-in workbook named
> Add-In which contains all code to manipulate QUOTES.  I have 2 option buttons
> on Sheet1 in QUOTES.  One named optAdTech and the other optFormetco.  These
> option buttons represent two different companies.  I need to change the
> Header and Footer information to whichever company option button is true when
> the quote is printed in the BeforePrint Event in QUOTES.
> 
> What is the best way to do this?  Note:  Left Header is company logo, Right
> Header is company address, Center Footer is text.
> 
> Would it be possible to save the AdTech's header/footer information and
> Formetco's header/footer information in the Add-In and then apply it in
> QUOTES?  For example:
> 
> Private Sub Workbook_BeforePrint(Cancel As Boolean)
> 
>     Select Case True
> 
>         Case optAdTech
>             ' call AdTech header/footer data from add-in
> 
>         Case optFormetco
>             ' call Formetco header/footer data from add-in
> 
>     End Select
> 
> End Sub
> 
> --
> Cheers,
> Ryan

-- 

Dave Peterson
0
Dave
12/8/2009 5:23:15 PM
Reply:

Similar Artilces:

Slow opening Excel Workbook with over 50 Worksheets
I have a workbook that is password protected that has over 50 worksheets. When I open this file it takes about two minutes for it to open and save. My other workbook that is basically the same thing but I just changed the years and added one Yearly Tab that calculates all of the worksheets opens just fine. Please someone help! Just some guesses. #1. Clean up your windows temp folder with excel closed. A quick way to get to windows temp folder: Windows start button|run %temp% and hit ok #2. If you save a copy with the password removed, is opening/saving quicker? ...

Why does viewing a MDB file change the modified date?
This has probably been asked many times before but I haven't come up with anything on google. Why does opening/viewing a MDB file change the modified date? This implications as far as our backup stratgey goes. Thanks. On Wed, 16 Jan 2008 01:32:51 GMT, wawork@hotmail.com (Randy K) wrote: >This has probably been asked many times before but I haven't come up >with anything on google. Why does opening/viewing a MDB file change >the modified date? This implications as far as our backup stratgey >goes. > >Thanks. The detailed "why" would require inside...

Change debits to credits
Is there a quick way to change a long column of debits to credits? I've been hitting F2, Home, Minus, Enter and it's taking me forever. I tried to record a macro but it changes the column to the number I was using in the macro. I am using Excel 2003. Thank you for your help :) Put -1 in an empty cell edit|copy (that cell) select your range of cells to change (just the cells to change!) Edit|paste special|check multiply clean up that helper cell with -1 in it. Yo wrote: > > Is there a quick way to change a long column of debits to credits? I've been > hitting F...

header and footer problems
Morning, I use a worksheet at work, which works out all scrap, customer return and other stuff. The file has about 20 different tabs showing graph and various tables linked together. There is one sheet which shows it months 'customer returns'. The footer on this page needed to be edite as is shows information from 2003. (We copied and renamed this t create this 2005 copy). I edited the header and footer with th information needed and pressed ok. This is the wierd part; I the looked at another tab within that document then went back to the ta where I edited the information, I looked a...

Unexpected price changes in orders
Sometime back we had a problem with price changes on back orders. What would happen is this, we would be out of an item so the order was placed in the WAIT batch. Then, when the item was made, the batch number would be changed to move it to a daily batch, then released. On some items - not all - when the batch number was changed, the price would change from the customer's price level price to the LIST price. When checking the Price List, the customer's price level price is still there, but that is not what is now on the order. The odd thing is that it doesn't occur on a...

Simple question : how to make a toolbar button on case form to dis
Hi, How to make a toolbar button on case form to display the list view of a custom entity? My main problem is where should I look to get the correct url? Many thanks! You can use a tool called Fiddler to capture the URL. But if you want to find the URL for the specific record, open up the record and hit Ctrl + N to open a new browser. You can see the URL that way. Darren Liu Crowe http://www.crowecrm.com On Sep 13, 8:24 am, m1sterd <m1st...@discussions.microsoft.com> wrote: > Hi, > > How to make a toolbar button on case form to display the list view of a > custom entit...

Page Footer
I built a report that has a page footer. In the page footer I have a long horizontal line and 2 short vertical lines, looks like this |__________________| - basically when it prints, it looks like the data is in a box. In the report section, the page footer has "Not with Rpt Ftr". I have a problem if I have less than 39 records, this vertical line is pushed down an inch past the last records. Looks like this: | ZAR 0 0 N | |________________________________________________| It works fine if I...

Change multiple file type from 2003 to 2007 format
I have a lot of templets and there is someplace you can highlight 8 to 10 and and do a "Save As" and you could change from 2003 to 2007. I can not remember how!! Help Thanks ...

last digit in string gets changed to 0 (16 characters long)
trying to enter 16 digit number for credit card. Last digit keeps changing to "0" Not to state the obvious, but numerically a 16 digit number is very large. The people that deal with that type of math usually use scientific notation. Since you're not doing math, try formatting your cells as text. XL only uses 15 digits of precision. Since card numbers are not used in calculations, you can make them "text", and then you can enter as many digits as you need. You can format the cells as Text *before* you enter the digits, OR You can prefix every entry of the numbe...

change excel pointer
Hiw can I change the colour of the white excel mouse pointer? Not an Excel question since changing the mouse pointer applies to all apps. Use Start|Control Panel->Mouse; open Pointers tab and make a selection. I hope no one else uses the computer! best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "sarahc" <sarahc@discussions.microsoft.com> wrote in message news:6D8625A7-EBDB-4A1F-B10D-969EE94BAA62@microsoft.com... > Hiw can I change the colour of the white excel mouse pointer? Hi, all; I'm using a different color mouse pointer...

Preserving/resetting internet options
I'd like a way to capture my Internet options and quickly apply them elsewhere, or re-apply them to the same machine. Ideally in a format hand-editable. Does IE have a .ini file? Where? I did a registry dump, changed them, and did another dump but I couldn't find any changes in the registry. What I'm after is the proxy settings (bypass list) and the cookie settings (don't blindly accept all of them) including the list of sleazeballs to reject from. There are a few others that I'm tired of manually setting when I take the laptop from home to work, or wh...

save options
Is there an option I can set so that when I send an email, Outlook will prompt me as to whether or not to save a copy of the sent email? ...

Trouble with Cell/Worksheet Protection...
I have a file with an input sheet where all cells are protected except for the few that require user input. When I am in this input sheet, the <CTRL>-Page-Down(and Up) keys do not work properly. Instead of moving to the next worksheet it scrolls to the right (or left) in the input sheet. Is this problem due to the cell protection in this sheet (it works properly in other sheets that are not protected in the same file)? If so, is there a way to correct this? Thanks! ...

Menu of Worksheet Tabs
Excel 2007 We have a workbook that contains a lot of tabs and it is sometimes hard to find the right tab. This morning, I was hit with the idea of inserting another sheet that would contain a hyperlinked menu of all the tabs. That would allow me to use CTRL+F to search on a keyword and quickly find the entry for the tab that I need. Since the list would be hyperlinked, I could then click the link and be taken to the tab. I'm not married to the idea of having a separate sheet with a hyperlinked list. If there is a better way to do it I would be open to those suggesti...

Update worksheet when changing another sheet
Hi, I have a main worksheet, columns A to H (8 columns), about 1000 rows and growing. I insert rows and change data regularly and I want to update another worksheet, which has only columns A to C plus E (4 columns, as some of the other info is not for everybody to see). Would a macro work? Would this be easy, or is there something else that would be better? Thanks. -- Regards, BB I take it you tried: Click in a cell is the sheet to be updated Press = Navigate to the data sheet Click a cell and press [Enter] If this is not working for you, try the following formula: =INDIRECT("...

How to change file ext. pub to jpg in Publisher
I saved images using Publisher 2000..file extension is PUB. I am trying to use the images in Kodak Easyshare software and would like to change the extension to jpg, is it possible? On Sun, 19 Feb 2006 00:17:27 +0000, Stellaluna514 wrote (in article <5E408E38-8737-4F5E-A867-59AF26065A07@microsoft.com>): > I saved images using Publisher 2000..file extension is PUB. I am trying to > use the images in Kodak Easyshare software and would like to change the > extension to jpg, is it possible? Nope. Contrary to popular belief, merely changing the TLE (Three Letter Extension) d...

all future times changed
I open up Outlook this morning and found all future appts recurring and one time now span two days! My jaw is bruised from hitting the table and I have no idea how to f ix this short of editing every item by hand. What could have caused this? Are you in North America? Did you run the DST patch on your O/S or from Automatic Updates? Did you remember to run the Outlook DST patch? -- Kathleen Orland Outlook Tips: http://www.outlook-tips.net/ http://www.howto-outlook.com/ "r0nbo" wrote: > I open up Outlook this morning and found all future appts recurring and one >...

how do I recover a file that was changed in publisher
I added several months to my publisher calendar, and after I did this it deleted all of my information from several months. I would like to know if there is any way to recover this information. Thank you Jesusfreak wrote: > I added several months to my publisher calendar, and after I did this > it deleted all of my information from several months. I would like to > know if there is any way to recover this information. > Thank you ================================== Did you save after you made the changes? If not...just re-open the original file. -- John Inzer MS-MVP Digit...

Junk Mail Options after Norton Uninstall
After encountering problems with Norton AntiVirus 2006, I uninstalled it. Now Outlook's standard Junk Filter options no longer appear. Is there a way to reset Outlook to get the original Junk Mail options back? Thank you Tim <tim@NOSPAMvisualmalls.com> wrote: > After encountering problems with Norton AntiVirus 2006, I uninstalled > it. Now Outlook's standard Junk Filter options no longer appear. > > Is there a way to reset Outlook to get the original Junk Mail options > back? Help>Detect and Repair? -- Brian Tillman ...

Changing column views
When I go into view-> columns and change the columns that I want to see in my view, it only saves the changes for that session. IE when I go back into Mail later it has reset to the original columns! How do I keep the view changes that I want permanently?? "Vic33" <Vic33@discussions.microsoft.com> wrote in message news:47019EF9-C74D-44A4-BE86-79283C4CEA5A@microsoft.com... > When I go into view-> columns and change the columns that I want to see in > my > view, it only saves the changes for that session. IE when I go back into > Mail later...

Changing Default View For Account Entity
Hi all, i would like to change the default view of account entity and we have default view is ‘Active accounts’. and to bring ‘Accounts: Responded to campaigns in Last 6 months’ as default view. i know it through settings........ but is there any other possibility through code...... Can anyone suggest me for this post Thanks in advance Karlapudi ...

change button colour #2
that works just as well although it takes a bit of work to get spot on thank -- jimbo69 ----------------------------------------------------------------------- jimbo693's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1421 View this thread: http://www.excelforum.com/showthread.php?threadid=26732 ...

RetrieveGlobals 10 not changing the company Database
Hi, I have observed while logging in one company database, the VB customization with Retrieveglobals does not change automatically the company when I shift between the companies. Only when I log off the GP and log back to the other company, then the customization works, Does anyone have any thoughts Thanks Janakiram M.P. RetrieveGlobals will (and should) not work for v10. You will need to use the UserInfo object. Take a look at my article "Using the New UserInfo object in VBA for Microsoft Dynamics GP 10" at http://dynamicsgpblogster.blogspot.com/2008/05/using-new-userinfo-ob...

Change interface language Office 2007 on XP?
Hi, My Office is installed with the Dutch interface. That means the captions on the buttons and help text is in Dutch. I would like to change that to English. I sometimes post questions on the English groups. That is hard when you use the Dutch interface. I tried to change the interface language with Start --> Programs --> Microsoft Office --> Microsoft Office assistance --> Microsoft Office 2007 - Language settings (or something like that). My 'Microsoft Office Language Settings 2007' are set to: Display Microsoft Office menus and dialog boxes in Englis...

change font in a forms control combo box
Am trying to change font in a combo box in Excel 2003 but cant figure out how to. The font appears to be a default size and style regardless of how large I make the combo box. I have canged the size of font in the linked list but this does not work. Any help welcomed. I suspect you are trying to use a combobox from the 'forms' toolbar. The font in these is fixed. If you use the 'controls' toolbox you will get an activeX control in which you can change the font attributes. You also used the 'linkedcell' property and 'ListFillRange' to fill and dis...