Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 19th, 2004, 12:16 PM
Registered User
 
Join Date: Aug 2004
Location: Owensboro, KY, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default VBA for Excel 2000...HELP!

This may not be the proper place to post this question, but I'm out of ideas of other places to post it. I am NOT a programmer, but find myself in a situation where I must write a macro in VBA for Excel. I'd use the help function to get me through this issue, but it's not loaded on my computer, and my employer unwittingly threw our Office disk away, so I'm stuck.

I need to write a macro to add the file path to Excel worksheet footers. I found one place online that told me how to do this, but it just doesn't work for me. The macro I was given is as follows:

Sub
  UpdateFooter()ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName
End Sub

The issue is, when I enter this information, it gives me errors telling me that everything in the first part of the macro is expected at the end. As I said, I can't access "help" to figure this out.

If anyone has ANY information that can help me, I would deeply appreciate it.

Thanks in advance.


Lee Hardesty

Everything works out in the end.  If it hasn't worked out, it isn't the end.
Reply With Quote
  #2 (permalink)  
Old August 19th, 2004, 11:25 PM
Authorized User
 
Join Date: Feb 2004
Location: , , Denmark.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Insert the following code in the module named ThisWorkBook

Private Sub Workbook_BeforePrint(Cancel As Boolean)
   ActiveSheet.PageSetup.LeftFooter = ThisWorkbook.FullName
End Sub

Hope it will help you.

Cheers
Karsten

Reply With Quote
  #3 (permalink)  
Old August 20th, 2004, 09:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , Denmark.
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Another possibility. Under Files - PageSetup you should be able to edit your Footer. Full path should be something like this:

   &[Path]&[File]

However, asking for a macro, you may already have tried it!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2000 Create PDF with VBA ralf.schmitt@rsdv.de Excel VBA 8 March 5th, 2008 03:36 PM
Excel 2000 VBA Problems drsammyb Excel VBA 0 January 17th, 2005 11:41 AM



All times are GMT -4. The time now is 04:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.