Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Office Data

Status
Not open for further replies.

maurelius

Electrical
Oct 15, 2008
27
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 ( 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?

Thanks
 
Replies continue below

Recommended for you

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.


TTFN

FAQ731-376
 
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
 
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.

-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 
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

TTFN

FAQ731-376
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor