ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to copy a sheet and rename it with the value of two cells from the source sheet? (https://www.excelbanter.com/excel-programming/361270-how-copy-sheet-rename-value-two-cells-source-sheet.html)

Simon Lloyd[_717_]

How to copy a sheet and rename it with the value of two cells from the source sheet?
 

Hi all,
I'm trying to copy a sheet as a picture and paste it in to a new shee
(all works well here!) but i also want to rename the sheet using th
text from cell B1 and cell B3 from the source sheet so it can b
identified easily later, here is the code i have but of course doesn
work.......if the text in B1 was Bob and the text in B3 was There the
rename the sheet "Bob There".

is this possible?
The line in blue doesnt work!

Regards,
Simon
Sub cardPicture()
Range("A1:I27").Select
Selection.CopyPicture Appearance:=xlPrinter, Format:=xlPicture
Sheets("Score Card").Select
Sheets.Add
ActiveSheet.Paste
ActiveWindow.DisplayGridlines = False
ActiveSheet.Select
ActiveSheet.Name = (Sheets("Score Card") Range("B1").Text An
Range("B3").Text)

End Su

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=54137



All times are GMT +1. The time now is 06:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com