![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 16
|
Does anyone know how to rename a sheet using the value of a cell in another sheet using VBA?
Thanks in advance |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 11
|
Is this what you where looking for?:
Dim NewSheetNameFromCell As String Sheets("Sheet1").Select NewSheetNameFromCell = Cells(1, 1).Value Sheets("Sheet2").Select ActiveSheet.Name = NewSheetNameFromCell ________________________________________ Where Cells(1, 1) is (row 1, column A) Luke |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: OKC
Posts: 98
|
this works where a1 on sheet 2 is where your name is:
Sub NAMER() Sheets("SHEET1").Name = Sheets_("SHEET2").Range("A1").Value End Sub |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 16
|
Thanks guys, that worked a treat!!!!!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|