View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JP[_4_] JP[_4_] is offline
external usenet poster
 
Posts: 897
Default Naming work sheet the name as sub-routine that creates it

This might not be terribly helpful, but you can give a worksheet any
name you want, provided it is <= 26 characters (which I believe is the
limit for the sheet tab).

--JP

On Oct 3, 5:02*pm, "Rich Mogy" wrote:
I have a macro that I'm trying to create several work sheets, and then put
information retrieved from a SQL database. *I would like the name of each
worksheet to be the same as the sub routine that created it. *Is this
possible through the code --

sub myworksheet
worksheets.add
worksheets.name(x) where x is the name of the sub
end sub

Thanks in advance.

Rich Mogy