Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why when I enter & in the customer header field, it does not show | Excel Discussion (Misc queries) | |||
Writing functions to prompt for info | Excel Worksheet Functions | |||
save prompt for user exit, but no save prompt for batch import? | Excel Discussion (Misc queries) | |||
1 Cust 14 locations how do I put all info into Customer & addres | Excel Discussion (Misc queries) | |||
Help with user prompt | Excel Discussion (Misc queries) |