Referring to sheets wiht variable names

D

daisy_robinson

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top