View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Martin Martin is offline
external usenet poster
 
Posts: 336
Default Adding new sheet problem-Macro

When the sheet's first made, it's the active sheet so I'd change the second
line to:
ActiveSheet.Name = "M1"

"pikapika13" wrote:


I'm very new to this. I'm trying to open a new worksheet and call it a
name.
However, I never know what sheet name excel is going to give me:
sometimes "Sheet1" or "Sheet10". It depends on how many times I run
the macro.
Is there a way to convert this:
' Workbooks.Add
Sheets("Sheet1").Name = "M1"

to something more friendly?


--
pikapika13
------------------------------------------------------------------------
pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892
View this thread: http://www.excelforum.com/showthread...hreadid=527159