copy paste sheet name



I am trying to Copy the Active worksheet name and paste it into cell AF2.

How can i do this?

I need it to added to this code:
Sub CommandButton1_Click()
With ActiveWorkbook
..Worksheets("1").Copy After:=.Worksheets(.Worksheets.Count)
ActiveSheet.Name = Worksheets.Count
Dim myFileName As Variant
Dim NewWksName As String
Dim NewWkbk As Workbook
Dim NewWks As Worksheet
NewWksName = Worksheets.Count
With NewWkbk
Set NewWks = Nothing
On Error Resume Next
Set NewWks = .Worksheets(NewWksName)
On Error GoTo 0
End With
If NewWks Is Nothing Then
End If
Call Macro10
ActiveCell = Me.ComboBox1.Value
ActiveSheet.Visible = True
End With
End Sub

Can anyone assist me with this ?



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question