ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using worksheet codenames (https://www.excelbanter.com/excel-programming/288834-using-worksheet-codenames.html)

dan

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?


All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com