Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Writing a macro so that when saving a spreadsheet the data cannot be changed

Hello all,
I work for a clinical research company. We are working toward
regulatory compliance with the FDA, and this includes electronic
records. At the current moment, we have system in place that exports
data to an excel spreadsheet from an old DOS based program. The
problem is that someone could theoretically change the data on the
spreadsheet, comprising the integrity and validity of the data and the
clinical trial. I need to make a system which does not allow users to
change the information on the spreadsheet.

I was thinking that a macro would work for something like this,
but I don't have much experience programming macros.

If anyone could point me in the right direction, I'd be grateful.

Thank you very much,
Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Writing a macro so that when saving a spreadsheet the data cannot be changed

Use PDF.

There is no way that you can really protect a workbook from
modification as long as the user has access to it. Macros can be
bypassed simply by holding down the shift key when opening the file.

Worksheet and Workbook protection are designed to keep people from
inadvertently changing data. There are free add-ins and macros (see

http://www.mcgimpsey.com/excel/removepwords.html

for one approach) available.

There are techniques you can use to make it more difficult (e.g.,
setting all but one sheet's .Visible property to xlVeryHidden and
putting "You must enable macros" on the remaining sheet, then using
the Workbook_Open event macro to unhide), but in general, they're
still for fooling really naive users, not those with, say, the
wherewithal to find these newsgroups.



In article ,
(Michael I) wrote:

Hello all,
I work for a clinical research company. We are working toward
regulatory compliance with the FDA, and this includes electronic
records. At the current moment, we have system in place that exports
data to an excel spreadsheet from an old DOS based program. The
problem is that someone could theoretically change the data on the
spreadsheet, comprising the integrity and validity of the data and the
clinical trial. I need to make a system which does not allow users to
change the information on the spreadsheet.

I was thinking that a macro would work for something like this,
but I don't have much experience programming macros.

If anyone could point me in the right direction, I'd be grateful.

Thank you very much,
Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Writing a macro so that when saving a spreadsheet the data cannot be changed

Hi,

You could protect the worksheet with the data (Tools,
protection, worksheet).

But be aware, that any advanced user can circumvent that
(passworded) protection within a few seconds.

Regards,

Jan Karel Pieterse
Excel TA/MVP

-----Original Message-----
Hello all,
I work for a clinical research company. We are working

toward
regulatory compliance with the FDA, and this includes

electronic
records. At the current moment, we have system in place

that exports
data to an excel spreadsheet from an old DOS based

program. The
problem is that someone could theoretically change the

data on the
spreadsheet, comprising the integrity and validity of the

data and the
clinical trial. I need to make a system which does not

allow users to
change the information on the spreadsheet.

I was thinking that a macro would work for something like

this,
but I don't have much experience programming macros.

If anyone could point me in the right direction, I'd be

grateful.

Thank you very much,
Mike
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Writing a macro so that when saving a spreadsheet the data cannot be changed

not sure if this is what you want but I am not expert either, try the
following, it is just lock and unlock the worksheet

Sub test()
'--------UNLOCK-------
ActiveWorkbook.Protect "111", Structu=False, Windows:=False
ActiveSheet.Protect "111", DrawingObjects:=False, Contents:=False,
Scenarios:=False

'--------
'procedure of what you need to do
ActiveCell.Value = 1
'--------

'--------LOCK--------
ActiveWorkbook.Protect "111", Structu=True, Windows:=True
ActiveSheet.Protect "111", DrawingObjects:=True, Contents:=True,
Scenarios:=True

End Sub


"Michael I" wrote in message
om...
Hello all,
I work for a clinical research company. We are working toward
regulatory compliance with the FDA, and this includes electronic
records. At the current moment, we have system in place that exports
data to an excel spreadsheet from an old DOS based program. The
problem is that someone could theoretically change the data on the
spreadsheet, comprising the integrity and validity of the data and the
clinical trial. I need to make a system which does not allow users to
change the information on the spreadsheet.

I was thinking that a macro would work for something like this,
but I don't have much experience programming macros.

If anyone could point me in the right direction, I'd be grateful.

Thank you very much,
Mike



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
writing a formula in Excel spreadsheet to track how long data has flyboy719 Excel Worksheet Functions 2 January 20th 10 09:59 AM
Writing Data with a macro??? Ted[_3_] New Users to Excel 7 January 4th 09 08:25 PM
Writing a macro that will exit a spreadsheet Dave Doc New Users to Excel 2 January 26th 06 01:41 PM
Saving excel data that is changed weekly Kaye Excel Worksheet Functions 1 March 7th 05 03:57 PM
Data changed in the back-up spreadsheet Plank Excel Discussion (Misc queries) 1 December 2nd 04 02:00 AM


All times are GMT +1. The time now is 02:14 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"