Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Unique value of Excel file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Unique value of Excel file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Unique value of Excel file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Unique value of Excel file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Unique value of Excel file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Unique value of Excel file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Unique value of Excel file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Unique value of Excel file

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I autosave a unique Excel file in the file format 03F67000 flyboy06 Setting up and Configuration of Excel 1 June 14th 06 11:11 PM
Unique File Identifier Jörgen Ahrens Excel Programming 3 December 5th 05 02:13 PM
Macro Save File (Unique file name) SJC Excel Worksheet Functions 5 October 27th 05 10:09 PM
How do I create a unique identifier # when open excel file? ritarowe Excel Worksheet Functions 2 September 28th 05 06:23 PM
unique file names Graeme R Excel Programming 1 October 12th 04 09:07 PM


All times are GMT +1. The time now is 06:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"