View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.newusers
vumian vumian is offline
external usenet poster
 
Posts: 1
Default How to use VBA to name sheet ?


hi everyone,

with code above, there is a error as following:

if value of C4 of every sheet same, it can not run code above.

how to msgbox in case

Sub GetName()
For Each sh In ActiveWorkbook.Worksheets
sh.Name =3D sh.Range("C4").Value
if .... What is it here to msgbox, pls
Next sh
End Sub


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