Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default rename sheet

Hi. If I copy a sheet to a new workbook, how can I rename that sheet with a
left function?

For example, the sheet I copied from book1 was called
"sheet1of_the_workbook". In excel terms, I want to rename the sheet
Left(that sheet name,5).

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default rename sheet

Dim sStr as String
sStr = "sheet1of_the_workbook"
worksheets(sStr).Name = Left(sStr,5)

--
Regards,
Tom Ogilvy


"Steph" wrote in message
...
Hi. If I copy a sheet to a new workbook, how can I rename that sheet with

a
left function?

For example, the sheet I copied from book1 was called
"sheet1of_the_workbook". In excel terms, I want to rename the sheet
Left(that sheet name,5).

Thanks!




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
how do i rename a sheet if the rename tab is inactive? Nelson Excel Worksheet Functions 1 March 3rd 10 10:28 AM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
Move data to new sheet - rename sheet based on criteria ? [email protected] Excel Discussion (Misc queries) 7 May 16th 07 10:22 PM
Rename a sheet greenfalcon[_3_] Excel Programming 5 August 1st 05 08:40 PM
Button to copy sheet, rename sheet sequencially. foxgguy2005[_3_] Excel Programming 9 June 17th 05 01:41 PM


All times are GMT +1. The time now is 08:23 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"