Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am building an excel template that uses a sheet as an entry form and
produces several sheets from the information entered. I want the worksheet names to come from information entered into specific cells on the first sheet. Many Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
ActiveSheet.Name = Range("A1") '<--CHANGE sheet and cell reference as
required! Regards, Stefi €žEdcase€ť ezt Ă*rta: I am building an excel template that uses a sheet as an entry form and produces several sheets from the information entered. I want the worksheet names to come from information entered into specific cells on the first sheet. Many Thanks |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1" '<===== Change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then Me.Name = Target.Value End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Edcase" wrote in message ... I am building an excel template that uses a sheet as an entry form and produces several sheets from the information entered. I want the worksheet names to come from information entered into specific cells on the first sheet. Many Thanks |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for the code , but it seems not to work. I copied the code straight
from your post and followed the instructions, saved the workbook and alteredvalue in the cell and nothing. What could I be doing wrong? "Bob Phillips" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "A1" '<===== Change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then Me.Name = Target.Value End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Edcase" wrote in message ... I am building an excel template that uses a sheet as an entry form and produces several sheets from the information entered. I want the worksheet names to come from information entered into specific cells on the first sheet. Many Thanks |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I've just tried it again and it works fine for me.
Put this line MsgBox "WS Change event" try again and see if it returns the MsgBox -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Edcase" wrote in message ... Thanks for the code , but it seems not to work. I copied the code straight from your post and followed the instructions, saved the workbook and alteredvalue in the cell and nothing. What could I be doing wrong? "Bob Phillips" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "A1" '<===== Change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then Me.Name = Target.Value End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Edcase" wrote in message ... I am building an excel template that uses a sheet as an entry form and produces several sheets from the information entered. I want the worksheet names to come from information entered into specific cells on the first sheet. Many Thanks |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Bob...I am trying to do the same thing. The problem is when I enter in a
cell in a different sheet. For instance, I need the sheet name on sheet 3 to be named what I enter in cell F2 on sheet 1. I can link a cell in sheet 3 to the entry cell on sheet 1, however, I need to edit and enter the cell on sheet 3 to get the sheet name to change. Bottom line: I want to enter a descriptor on an entry sheet and have a specific sheet change name to what was entered. Is this possible? Thanks! "Bob Phillips" wrote: I've just tried it again and it works fine for me. Put this line MsgBox "WS Change event" try again and see if it returns the MsgBox -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Edcase" wrote in message ... Thanks for the code , but it seems not to work. I copied the code straight from your post and followed the instructions, saved the workbook and alteredvalue in the cell and nothing. What could I be doing wrong? "Bob Phillips" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "A1" '<===== Change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then Me.Name = Target.Value End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Edcase" wrote in message ... I am building an excel template that uses a sheet as an entry form and produces several sheets from the information entered. I want the worksheet names to come from information entered into specific cells on the first sheet. Many Thanks |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How would you know which cell refers to which sheet? You need some linkage
for the code to base upon. I suppose you could always use, first sheet takes A2, second takes B2, etc., but it needs user discipline not to move the sheets around. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Deeds" wrote in message ... Bob...I am trying to do the same thing. The problem is when I enter in a cell in a different sheet. For instance, I need the sheet name on sheet 3 to be named what I enter in cell F2 on sheet 1. I can link a cell in sheet 3 to the entry cell on sheet 1, however, I need to edit and enter the cell on sheet 3 to get the sheet name to change. Bottom line: I want to enter a descriptor on an entry sheet and have a specific sheet change name to what was entered. Is this possible? Thanks! "Bob Phillips" wrote: I've just tried it again and it works fine for me. Put this line MsgBox "WS Change event" try again and see if it returns the MsgBox -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Edcase" wrote in message ... Thanks for the code , but it seems not to work. I copied the code straight from your post and followed the instructions, saved the workbook and alteredvalue in the cell and nothing. What could I be doing wrong? "Bob Phillips" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "A1" '<===== Change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then Me.Name = Target.Value End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Edcase" wrote in message ... I am building an excel template that uses a sheet as an entry form and produces several sheets from the information entered. I want the worksheet names to come from information entered into specific cells on the first sheet. Many Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fill cell with color from other worksheet | Excel Discussion (Misc queries) | |||
Conversion of Cell Contents into a Functional Worksheet name ? | Excel Worksheet Functions | |||
macro help | Excel Discussion (Misc queries) | |||
Refrencing another cell in a worksheet that "could" exist | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |