Thread: Name Worksheet
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Name Worksheet

hi,

When you add a sheet it becomes the activesheet so use that

Worksheets.Add
ActiveSheet.Name = "Remaining"

Mike

"MCheru" wrote:

I have a macro that creates a new worksheet when I run it. The given name
could be Sheet 1, Sheet 2, Sheet 3, etc. The point is that I never know what
number Sheet the macro will give the worksheet because it changes each time I
run it. I want to create a code that will find the worksheet with Sheet in
the name and change the name of the worksheet to Remaining. Here is what I
have so far.

newsht.Name = "Remaining"