Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am looking for something which can serve as unique value for
individual Excel file. It should be: - unique for each individually created file (file - new) - should not change if you make a copy of the file (save as) or modify the file - user should not be able to modify it (or at least it should be hard to do). any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
After serious thinking witek wrote :
I am looking for something which can serve as unique value for individual Excel file. It should be: - unique for each individually created file (file - new) - should not change if you make a copy of the file (save as) or modify the file - user should not be able to modify it (or at least it should be hard to do). any ideas? You can store a value in a DefinedName, then hide the name so it doesn't show up in lists. You do this by setting its .Visible property to False. ActiveWorkbook.Names.Add "UniqueName", "UniqueValue", False To validate the workbook... In some procedu Dim sMsg$ If bNameExists("UniqueName") Then _ sMsg = "Validated" Else sMsg = "Not Validated" A reusable function to check a workbook for an existing name: Function bNameExists(sDefinedName$, Optional Wkb As Workbook) As Boolean Dim x As Object If Wkb Is Nothing Then Set Wkb = ActiveWorkbook On Error Resume Next Set x = Wkb.Names(sDefinedName) bNameExists = (Err = 0) End Function -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
GS wrote:
You can store a value in a DefinedName, then hide the name so it doesn't show up in lists. You do this by setting its .Visible property to False. ActiveWorkbook.Names.Add "UniqueName", "UniqueValue", False For now it is the only solution I know. however value can be changed by any addin installed. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
witek has brought this to us :
GS wrote: You can store a value in a DefinedName, then hide the name so it doesn't show up in lists. You do this by setting its .Visible property to False. ActiveWorkbook.Names.Add "UniqueName", "UniqueValue", False For now it is the only solution I know. however value can be changed by any addin installed. True.., so long as the addin knows the unique name. While anything is possible (ergo NOTHING is 100% secure), it's logical to presume the average user will not mess with things since their objective is to use the file for its intended purpose. -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
GS wrote:
witek has brought this to us : GS wrote: You can store a value in a DefinedName, then hide the name so it doesn't show up in lists. You do this by setting its .Visible property to False. ActiveWorkbook.Names.Add "UniqueName", "UniqueValue", False For now it is the only solution I know. however value can be changed by any addin installed. True.., so long as the addin knows the unique name. The problem is that addin can list hidden names. If hidden or "secure" names could only be listed by module which created them it would be perfect. There is such thing in c++/XLL programming but name can be accessed only if worksheet with this name is active. It does not work for me. I have to have access to it all time. While anything is possible (ergo NOTHING is 100% secure), it's logical to presume the average user will not mess with things since their objective is to use the file for its intended purpose. the problem is that is a goal for a user. To find that information and copy it to other workbooks. It must be something which user can't read or can't find. thanks for help. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
witek pretended :
GS wrote: witek has brought this to us : GS wrote: You can store a value in a DefinedName, then hide the name so it doesn't show up in lists. You do this by setting its .Visible property to False. ActiveWorkbook.Names.Add "UniqueName", "UniqueValue", False For now it is the only solution I know. however value can be changed by any addin installed. True.., so long as the addin knows the unique name. The problem is that addin can list hidden names. If hidden or "secure" names could only be listed by module which created them it would be perfect. There is such thing in c++/XLL programming but name can be accessed only if worksheet with this name is active. That's absolutely not true! Any programming language can access names without even opening the file! It does not work for me. I have to have access to it all time. While anything is possible (ergo NOTHING is 100% secure), it's logical to presume the average user will not mess with things since their objective is to use the file for its intended purpose. the problem is that is a goal for a user. To find that information and copy it to other workbooks. It must be something which user can't read or can't find. The above statement contradicts the previous statement. If it's the goal of users to find and copy the info then your quest for something they can't read/find is pointless, ..now isn't it? I think you're SOL! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
GS wrote:
witek pretended : GS wrote: witek has brought this to us : GS wrote: You can store a value in a DefinedName, then hide the name so it doesn't show up in lists. You do this by setting its .Visible property to False. ActiveWorkbook.Names.Add "UniqueName", "UniqueValue", False For now it is the only solution I know. however value can be changed by any addin installed. True.., so long as the addin knows the unique name. The problem is that addin can list hidden names. If hidden or "secure" names could only be listed by module which created them it would be perfect. There is such thing in c++/XLL programming but name can be accessed only if worksheet with this name is active. That's absolutely not true! Any programming language can access names without even opening the file! how can you access anything in the file without opening it? reading sectors on hard drive? I know that you can access xml. That is another thing I do not like in open format. It does not work for me. I have to have access to it all time. While anything is possible (ergo NOTHING is 100% secure), it's logical to presume the average user will not mess with things since their objective is to use the file for its intended purpose. the problem is that is a goal for a user. To find that information and copy it to other workbooks. It must be something which user can't read or can't find. The above statement contradicts the previous statement. If it's the goal of users to find and copy the info then your quest for something they can't read/find is pointless, ..now isn't it? I think you're SOL! that information is not for user it is for program program can, user does not have to. think about cryptography and credit cards. you can't access data stored on a chip. Program can. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Any program that uses ADODB can access data from Excel files without
opening them. Unfortunately, your broken English makes your situation difficult to understand. Perhaps if you try to clearly explain what it is that you want to accomplish we can better help you! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I autosave a unique Excel file in the file format 03F67000 | Setting up and Configuration of Excel | |||
Unique File Identifier | Excel Programming | |||
Macro Save File (Unique file name) | Excel Worksheet Functions | |||
How do I create a unique identifier # when open excel file? | Excel Worksheet Functions | |||
unique file names | Excel Programming |