Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default 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
UserForm1.Hide
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
[B3].Select
ActiveCell = Me.ComboBox1.Value
ActiveSheet.Visible = True
End With
End Sub



Can anyone assist me with this ?

Regards

Corey


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default copy paste sheet name

Range("AF2").Value = ActiveSheet.Name

HTH

Die_Another_Day
"Corey" wrote in message
...
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
UserForm1.Hide
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
[B3].Select
ActiveCell = Me.ComboBox1.Value
ActiveSheet.Visible = True
End With
End Sub



Can anyone assist me with this ?

Regards

Corey



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default copy paste sheet name

thanks

--
Regards

Corey


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy from one Sheet and paste on another sheet based on condition Prem Excel Discussion (Misc queries) 2 December 24th 07 05:05 AM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
Copy and paste from one sheet to many Hil Excel Programming 0 March 16th 06 12:52 AM
Copy, paste to another sheet HrvojeZagi Excel Programming 3 April 2nd 05 07:56 PM
automatic copy and paste from sheet to sheet in a workbook ramseyjramseyj Excel Programming 6 December 11th 04 12:37 AM


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"