#1   Report Post  
tamato43
 
Posts: n/a
Default Macro Help needed

I'm trying to record a macro but I'm having difficulty with a particular
action.

I'm trying to copy text from a particular cell, Lets say Cell A1, and then
go to the "Sheet Tabs", currently labeled Sheet 1, and paste the text to
rename the sheet.

Can Someone tell me what I'm missing from the following macro to make this
happen:

Sub Macro()
'
' Macro Macro
' Macro recorded 8/18/2005 by Anthony Amato
'

'
Range("A1").Select
Selection.Copy
Sheets("Sheet 1").Select
Sheets("Sheet 1").Name = " " (Should I add paste here? and how)
Range("B17").Select
End Sub


Any help would be greatly appreciated.

  #2   Report Post  
bigwheel
 
Posts: n/a
Default

All you need is something like this:-

Sub Macro()
Sheets(1).Name = Range("A1").Value
Range("B17").Select
End Sub

Refer to Sheet1 by number rather than name as you can rename the sheet at
any time by changing the value in A1

"tamato43" wrote:

I'm trying to record a macro but I'm having difficulty with a particular
action.

I'm trying to copy text from a particular cell, Lets say Cell A1, and then
go to the "Sheet Tabs", currently labeled Sheet 1, and paste the text to
rename the sheet.

Can Someone tell me what I'm missing from the following macro to make this
happen:

Sub Macro()
'
' Macro Macro
' Macro recorded 8/18/2005 by Anthony Amato
'

'
Range("A1").Select
Selection.Copy
Sheets("Sheet 1").Select
Sheets("Sheet 1").Name = " " (Should I add paste here? and how)
Range("B17").Select
End Sub


Any help would be greatly appreciated.

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
Macro to omit blank cells needed Emece Excel Worksheet Functions 4 June 21st 05 08:07 PM
Macro needed Randall Roberts Excel Worksheet Functions 1 June 16th 05 11:52 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM
Forlmula or macro needed GWB Direct Excel Discussion (Misc queries) 7 May 5th 05 03:11 AM


All times are GMT +1. The time now is 11:02 PM.

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

About Us

"It's about Microsoft Excel"