I have gotten this far but can not get the Macro to pull in the new Tab Name? how is this done?
Thanks....
Sub AddNameNewSheet2()
'Remember where we started
'Not needed if you don't want to return to where you started but want
'to stay on the New Sheet
Dim CurrentSheetName As String
CurrentSheetName = ActiveSheet.Name
'Add New Sheet
Sheets.Add
'Make sure the name is valid
On Error Resume Next
'Get the new name
ActiveSheet.Name = InputBox("Name for new worksheet?")
'Keep asking for name if name is invalid
Do Until Err.Number = 0
Err.Clear
ActiveSheet.Name = InputBox("Try Again!" _
& vbCrLf & "Invalid Name or Name Already Exists" _
& vbCrLf & "Please name the New Sheet")
Loop
On Error GoTo 0
'Go back to where you started
'Not needed if you don't want to return to where you started but want
'to stay on the New Sheet
'Sheets(CurrentSheetName).Select
Call Macro1
End Sub
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/7/2006 by IdleAire Technologies Corp.
Sheets("excel1").Select
Cells.Select
Selection.Copy
************************************************
Sheets(ActiveSheet).Select
***********************************************
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells.EntireColumn.AutoFit
Columns("F:F").Select
Application.CutCopyMode = False
Selection.Cut
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Range("B5").Select
End Sub
|