Can a workbook be 'Tagged' as follows:?

S

Stuart

I would like to find a way to reliably 'tag' a workbook, such that
a simple check via code will return the 'type' of workbook the
user is working with.

I will place the 'tag' when the workbook is created.

Later, I would use code to check the type of workbook, and direct
further code accordingly.

Say there are 3 types of workbook, and where the user must not
be able to change the 'tag'.

Can this be achieved, please?

Regards.
 
J

John Green

You could create a hidden name in the workbook.

ActiveWorkbook.Names.Add Name:="Tag", RefersTo:="Type1", Visible:=False
 
S

Stuart

Thanks for that.

Is this going to work in both Excel 2000 and '97,
and how do I reference/check the existence of
the new name, please?

Regards.
 

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