Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default How to use VBA to name sheet ?


I have a file that i do not know how many sheet are there in before

i need to copy contain of C4 to name of sheets

Thank for your help.


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=564347

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,593
Default How to use VBA to name sheet ?


For Each sh In Activeworkbook.Worksheets

sh.Name = sh.Range("C4").Value

Next sh

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"vumian" wrote in
message ...

I have a file that i do not know how many sheet are there in before

i need to copy contain of C4 to name of sheets

Thank for your help.


--
vumian
------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=564347



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default How to use VBA to name sheet ?


hi,

sorry, i fail to understand your mean

Could you be more specific,pls

Thank you.


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=564347

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 427
Default How to use VBA to name sheet ?

Create and run that macro.

Will do the job.

Unless you left something out of the original query.

Steve



On Tue, 25 Jul 2006 16:02:59 +0100, vumian
wrote:


hi,

sorry, i fail to understand your mean

Could you be more specific,pls

Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default How to use VBA to name sheet ?


thanks your idea, but here can not create macro coz i do not know how
many sheet before ?

How to use For statement here ?
VBA only.

thanks for your help.


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=564347



  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 427
Default How to use VBA to name sheet ?

Why VBA only,

Anyway I count Excel macros as VBA

"For Each sh In Activeworkbook.Worksheets"

That does the counting for you.


On Tue, 25 Jul 2006 16:19:26 +0100, vumian
wrote:


thanks your idea, but here can not create macro coz i do not know how
many sheet before ?

How to use For statement here ?
VBA only.

thanks for your help.


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
Sum up columns in different sheet with error check zeyneddine Excel Discussion (Misc queries) 13 July 10th 06 01:21 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
lock tab in sheet 2 until cell in sheet one is completed john tempest Excel Worksheet Functions 7 November 24th 05 08:45 AM
Using a relative SHEET reference for source data in a chart James Charts and Charting in Excel 6 August 16th 05 05:07 PM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 07:43 AM


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