View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cimjet[_3_] Cimjet[_3_] is offline
external usenet poster
 
Posts: 157
Default Copy Sheet and rename it.

Hi Everyone
I've got this macro that made a backup of my invoice and renamed it, but now
instead of making a backup copy, it renames my original Invoice copy.
Sub Make_Bkup_Copy()
On Error Resume Next
ActiveSheet.Copy after:=lastSheet
Set ws = ActiveSheet
ws.Name = Range("K2") & "-" & Range("G1")

With Target
If .Value < "" Then
Name = .Value
End If
End With

Sheets("Summary").Columns("A:F").fmTextAlign , 2
Sheets("Summary").Move befo=Sheets("Facture")
Sheets("Facture").Select
Range("K2").Select

End Sub
It should copy my Invoice , rename the Tab with cell K2 and G1 ( Invoice number
with name)
Any help would be appreciated.
Thank you
Cimjet