Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Prompt user for Customer Name to use info in Header

Hi all. How can I prompt (on Excel Spreadsheet Load ) a user to enter the
name of a customer and have that customer name appear as part of the text in
the Header (or footer)?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Prompt user for Customer Name to use info in Header

Private Sub Workbook_Open()
Dim nameit As String
nameit = InputBox("enter a name")
Sheets("Sheet1").PageSetup.CenterFooter = nameit
'or ActiveSheet.PageSetup.CenterFooter = nameit
End Sub


Gord Dibben MS Excel MVP


On Thu, 13 Sep 2007 09:52:07 -0700, Epoh Rio
wrote:

Hi all. How can I prompt (on Excel Spreadsheet Load ) a user to enter the
name of a customer and have that customer name appear as part of the text in
the Header (or footer)?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Prompt user for Customer Name to use info in Header

Interesting. I am not getting this to work. I placed the code in the
workbook's VBAProject but it does nothing when I open the workbook. Just a
warning about macros (macro security set to medium--i also set it to low but
nothing still)

when i press 'play ' it works perfectly. what am i missing

thanks,

"Gord Dibben" wrote:

Private Sub Workbook_Open()
Dim nameit As String
nameit = InputBox("enter a name")
Sheets("Sheet1").PageSetup.CenterFooter = nameit
'or ActiveSheet.PageSetup.CenterFooter = nameit
End Sub


Gord Dibben MS Excel MVP


On Thu, 13 Sep 2007 09:52:07 -0700, Epoh Rio
wrote:

Hi all. How can I prompt (on Excel Spreadsheet Load ) a user to enter the
name of a customer and have that customer name appear as part of the text in
the Header (or footer)?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Prompt user for Customer Name to use info in Header

This is event code and goes into Thisworkbook module, not a general module.

With your workbook open, Alt + F11 to go to the VBEditor.

Select your workbook/project and expand by clicking on the "+" sign.

From Microsoft Excel Objects double-clck on ThisWorkbook module to open it.

Paste the code into that module.

Save/close and re-open.


Gord

On Thu, 13 Sep 2007 12:54:00 -0700, Epoh Rio
wrote:

Interesting. I am not getting this to work. I placed the code in the
workbook's VBAProject but it does nothing when I open the workbook. Just a
warning about macros (macro security set to medium--i also set it to low but
nothing still)

when i press 'play ' it works perfectly. what am i missing

thanks,

"Gord Dibben" wrote:

Private Sub Workbook_Open()
Dim nameit As String
nameit = InputBox("enter a name")
Sheets("Sheet1").PageSetup.CenterFooter = nameit
'or ActiveSheet.PageSetup.CenterFooter = nameit
End Sub


Gord Dibben MS Excel MVP


On Thu, 13 Sep 2007 09:52:07 -0700, Epoh Rio
wrote:

Hi all. How can I prompt (on Excel Spreadsheet Load ) a user to enter the
name of a customer and have that customer name appear as part of the text in
the Header (or footer)?

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Prompt user for Customer Name to use info in Header

Thank you Gord, I figured it out before I checked back but you answered my
question correctly.

----------------
One more related question, how can I enter data from a prompt into Sheet2 or
a worksheet with a different name, without making that worksheet the current
worksheet?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why when I enter & in the customer header field, it does not show Patent accountant Excel Discussion (Misc queries) 3 December 31st 07 05:11 PM
Writing functions to prompt for info Conan Kelly Excel Worksheet Functions 1 December 28th 06 09:22 PM
save prompt for user exit, but no save prompt for batch import? lpj Excel Discussion (Misc queries) 1 February 25th 06 02:08 AM
1 Cust 14 locations how do I put all info into Customer & addres Christian in need of help Excel Discussion (Misc queries) 0 December 29th 05 01:43 AM
Help with user prompt Rob Gould Excel Discussion (Misc queries) 5 March 14th 05 12:38 PM


All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"