View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Using worksheet codenames

I am trying to write everything using worksheet codenames instead of tabnames but am having trouble when these are not hard coded

I have a sheet1 (codename) with tabname "dog"; sheet2 (codename) with tabname "cat";sheet3 (codename) with tabname "mouse";sheet4 (codename) with tabname "ferret

should I not be able to write

sheet2.copy after := sheet

I would expect to get sheet5 (codename) with tabname "cat (2)

similarly if I have a string variable cnam

cname = "sheet2

cname.copy after :=cname should do the same thin

As I write this maybe cname has to to be a worksheet object? How would that work?