What do I subsitute or use in a macro to change a sheet reference I selected manually, i.e. Sheets("Sheet1").Select to take the reference in a cell for the sheet name?
Thanks
What do I subsitute or use in a macro to change a sheet reference I selected manually, i.e. Sheets("Sheet1").Select to take the reference in a cell for the sheet name?
Thanks
Hi,
Do you mean you want to rename the active sheet to say the value in cell A1for example??
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
If that's what you meant then try
![]()
Sub x() ActiveSheet.Name = Range("A1").Value End Sub
VBA Noob
No. I want the macro to input data from the active sheet to the sheet name that is identified in cell c4 on the active sheet. I will have a number of sheets with various names which will be identified in C4. Cell C4 and other cells are populated by a dropdown box and manual data entry. That info will be will be transferred the sheet selected in C4 by a enter button. Other sheets will be populated with similar data so the sheet name is the key.
Thanks and sorry for not describing it clearer.
Think you need to give more info.
E.g If say C4 value in activesheet is Sheet2 then what range are you copying and where will it paste to within Sheets??
VBA Noob
Here is the Macro. Just need it to enter on the sheet identified by C4
![]()
Sub EnterData() ' ' EnterData Macro ' Macro recorded 2/19/2007 by ' ' Keyboard Shortcut: Ctrl+s ' Range("E3:G3").Select Selection.Copy Sheets ("Sheet4") Range("A7").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Rows("7:7").Select Application.CutCopyMode = False Selection.Insert Shift:=xlDown Rows("28:28").Select Selection.Delete Shift:=xlUp Sheets("Sheet1").Select End Sub
Last edited by VBA Noob; 02-19-2007 at 05:19 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks