MACRO for copying active sheet without using a certain name

  • Thread starter Thread starter Tami
  • Start date Start date
T

Tami

I have been shown a sub for getting a name put to the bottom of the sheet
but I also want to transfer the sheet with a macro to another book. But the
problem I get is the name of the sheet will be different every time.

Any help would be appreciated

Tami
 
Hi Tami,

If you post the sub, I'm sure it can be adapted to suit your purposes.

Alternatively, please explain with a little more detail.
 
Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A14")) Is Nothing Then
With Target
Me.Name = .Value
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub
 
Hi Tami,

I am not sure that I follow you,

If you copy the sheet to another workbook, the code will be copied with the
sheet.
In short the no matter the whether the sheet is in its existing workbook or
copied to another workbook. the sheet will be renamed according to the
changes that you make to cell A14, Naturally, any such change will be
reflectted in the sheet's tab.


Regards,
Norman
 

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

Back
Top