Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default How do I get a cell to read sheet label?

I'm working on a report card for my mom's school, and I need to set up a
Macro Button that will Copy the test of that sheet's label & paste it into a
specific cell. This is what I recorded, but I'm getting an error at "Active
Sheet.Paste":

Range("R2:W2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Sheets("Vanessa Bailey").Select
Sheets("Vanessa Bailey").Name = "Vanessa Bailey"
Range("R2").Select
ActiveSheet.Paste
Range("R2:W2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
End Sub
--
Vanessa M Bailey
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 709
Default How do I get a cell to read sheet label?

VBailey, do you just need the sheet name in a cell? If so try something like
this
Range("A1") = ActiveSheet.Name
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"VBailey" wrote in message
...
I'm working on a report card for my mom's school, and I need to set up a
Macro Button that will Copy the test of that sheet's label & paste it into
a
specific cell. This is what I recorded, but I'm getting an error at
"Active
Sheet.Paste":

Range("R2:W2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Sheets("Vanessa Bailey").Select
Sheets("Vanessa Bailey").Name = "Vanessa Bailey"
Range("R2").Select
ActiveSheet.Paste
Range("R2:W2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
End Sub
--
Vanessa M Bailey



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
Linking worksheets cjgeorge Excel Worksheet Functions 5 October 16th 06 09:30 PM
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Want cell ref. to change after sort in other sheet Bullfn33 Excel Discussion (Misc queries) 1 August 6th 06 05:48 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Does excel recognise names rather than cells? Sue Excel Worksheet Functions 9 May 22nd 05 04:51 AM


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

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"