ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referring to sheets wiht variable names (https://www.excelbanter.com/excel-programming/387486-referring-sheets-wiht-variable-names.html)

[email protected]

Referring to sheets wiht variable names
 
I really need to be able to refer to sheets with variable sheet names.
I managed to get this working within one workbook using the indirect
function. However i need to be able to do this referring from one
workbook to the sheets in another workbook. The indirect function only
works in this case if both workbooks are open which in my case isn't
practical.

Does anyone know anyway of doing this, either by just using excel, or
by using VBA as well? It would be a great help.

Thankyou!

Daisy


Norman Jones

Referring to sheets wiht variable names
 
Hi Daisy,

You could download Laurent Longre's free Add-in Morefunc.xll at

http://xcell05.free.fr/

See particularly, the Add-In's Indirect.Ext function..


---
Regards,
Norman


wrote in message
oups.com...
I really need to be able to refer to sheets with variable sheet names.
I managed to get this working within one workbook using the indirect
function. However i need to be able to do this referring from one
workbook to the sheets in another workbook. The indirect function only
works in this case if both workbooks are open which in my case isn't
practical.

Does anyone know anyway of doing this, either by just using excel, or
by using VBA as well? It would be a great help.

Thankyou!

Daisy




joel

Referring to sheets wiht variable names
 
You can rename any worksheet by right click on sheet name tab at botttom of
worksheet.

From VBA yu can call each worksheet by this name
sheets("Myname").activate

You can get every worksheet with

for each ws in worksheets

msgbox("Worksheet name : " & ws.name)

next ws

" wrote:

I really need to be able to refer to sheets with variable sheet names.
I managed to get this working within one workbook using the indirect
function. However i need to be able to do this referring from one
workbook to the sheets in another workbook. The indirect function only
works in this case if both workbooks are open which in my case isn't
practical.

Does anyone know anyway of doing this, either by just using excel, or
by using VBA as well? It would be a great help.

Thankyou!

Daisy




All times are GMT +1. The time now is 10:00 AM.

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