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 | 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 December 11th, 2003, 04:13 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Madison, Wisconsin, USA.
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default A Bit Of A Problem

Hi all,

I hope y'all can help me out with this problem. I am working on programming an Excel spreadsheet with the HeaderFooter procedure. This is how the code looks:

'HeaderFooter Procedure
'Procedure to customize the header and footer
'
Sub HeaderFooter()
    'Inserts the filename in the header
    Worksheets("January 2003").PageSetup.CenterHeader = "&F"
    'Declares the variable LeftFooterText as a string
    Dim LeftFooterText As String
    'Prompts user for left footer text
    LeftFooter = InputBox("Enter your full name:")
    'Inserts response into left footer
    Worksheets("January 2003").PageSetup.LeftFooter = LeftFooterText
    Worksheets("January 2003").PageSetup.CenterFooter = ""
    'Inserts the date into right footer
    Worksheets("January 2003").PageSetup.RightFooter = "&D"
End Sub


My problem is that I can't seem to get my name to display on the left-side footer of the spreadsheet in Print Preview. Anybody got a clue as to what could be wrong with the code?

Thanks in advance,


Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself
__________________
Ben Horne
-------------------------
I don\'t want to sound like I haven\'t made any mistakes.  I\'m confident I have.

Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator

Welcome to the New Age
Reply With Quote
  #2 (permalink)  
Old December 12th, 2003, 12:55 AM
Authorized User
 
Join Date: Nov 2003
Location: Commerce Twp, MI, USA.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You declared the variable with the name 'LeftFooterText'. Then your input box references "LeftFooter". Change that to "LeftFooterText" and the string should appear.

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
64 Bit - Issue in 64 bit IIS calling Win32 API Hubman General .NET 1 August 24th, 2006 09:19 AM
Getting Bit value from datareader. DittoToo ADO.NET 1 May 25th, 2006 11:19 AM
A bit concerned JoanW BOOK: Accessible XHTML and CSS Web Sites: Problem Design Solution 1 April 24th, 2006 08:24 AM
bit error! sxbluebird BOOK: Professional C#, 2nd and 3rd Editions 0 February 10th, 2004 06:03 AM
Bit Operation in C#? oatcpe C# 1 August 15th, 2003 03:51 AM



All times are GMT -4. The time now is 10:08 PM.


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