Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Office Data

Office Data

Office Data

Hello all,
How can I save data in MS Office applications using VBA.  Now I realise how stupid this sounds at first glance, so let me elaborate....

I want to store essentially hidden data so that users are unaware of it an therefore cannot fiddle.  

MS Word has the ability to use variables (http://support.microsoft.com/kb/306281) but that is no good for Excel, Access or PowerPoint.

I cannot use registry entries as then do not follow the documents when they are copied and used by individuals.

Is there a way to achieve this?


RE: Office Data

Depends on how much data you want to store.  All Office documents have a properties section and there are several fields that are intended to accept author data, but they wouldn't necessarily be "hidden".  You could, however, encode or encrypt your data before placing it in the Properties section.


FAQ731-376: Eng-Tips.com Forum Policies

RE: Office Data

It also depends how hidden you want it.

If you just want to avoid casual tampering you can write the data to a hidden and password protected worksheet in Excel using VBA.

That won't stop someone determined to get at the data, but if it is that sensitive you need to be using something other than Office.

For Access and Powerpoint I don't know, but at least in Access I'm sure there are ways to protect data, which would probably be more secure than Excel.

Doug Jenkins
Interactive Design Services

RE: Office Data

Remember, VBA is not meant to be a secured source language in any way.  It's only meant for casual scripting.  But, I suppose you could read and write encrypted data to a sequential or random access file that exists in a hidden location.  But if someone knows how to get into and read code they would be able to find the file.  How VBA-smart are the people you are hiding it from, and how determined are they?

You might also change the excel workbook to an add-in and password protect it.  As an add-in your functions would run in the background and all the worksheets in the add-in workbook would be inaccesable to users.  This should protect both the VBA code and any information stored in the worksheets.

Like IRstuff said, depends on how much data you want to store and how sensitive it is.

Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]

RE: Office Data

A simple public key encryption utility like PGP can be run outside of Excel, and Excel can simply be used as the storage medium.  So long as the keys are kept safe, the encrypted data can be stored pretty much anywhere


FAQ731-376: Eng-Tips.com Forum Policies

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close