Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Protecting worksheets


Good afternoon,

I am working on a workbook that will be used by users of varyin
computer skills. I am creating an interface that uses forms for th
users to input required data. My concern is that while I don't allo
users to get to the excel worksheets once they have enabled the macros
all they have to do is select disable macros when the workbook firs
starts up. They could then mess up the worksheets or worse the data o
those sheets.

So I was wondering if there is a way to disable this feature for
specific workbook? If not, can anyone suggest how I can accomplis
what I am looking to do?

I was thinking of using "Protect Sheets" on close and then "Unprotec
sheets" on open but I am not sure how to do this and apply it to al
the sheets. And would it work if new sheets were imported using VBA?
Basically is there a way to apply that to everysheet in the workbook?

Thanks for any assistance!
d

--
toocol
-----------------------------------------------------------------------
toocold's Profile: http://www.excelforum.com/member.php...fo&userid=3160
View this thread: http://www.excelforum.com/showthread.php?threadid=52285

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Protecting worksheets

all you need to do is to set displayalerts = false on exit. When you
open it should go straight into the macro.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Protecting worksheets


Thanks Justin,

Just one quick question, will that only apply to this one workbook? O
will it prevent the choice for all workbooks?

I only want to do it for the one workbook.

Cheers,
d

--
toocol
-----------------------------------------------------------------------
toocold's Profile: http://www.excelforum.com/member.php...fo&userid=3160
View this thread: http://www.excelforum.com/showthread.php?threadid=52285

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Protecting worksheets

Putting it in the sheet code will apply it to the corresponding
workbook. I am not sure how to make this apply to all workbooks
besides putting it in all sheet codes.

-justin

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Protecting worksheets


Hi Justin,

No that would be perfect. I only want it to apply to the one workboo
but I must be a little slow, because it hasn't worked for me yet.

Within the workbook, I have put it under Microsoft objects, in th
"ThisWorkbook".

Basically this is the code that I used:

Private Sub Workbook_BeforeClose(Cancel As Boolean)

displayalerts = false

End Sub

Is this what you meant because it doesn't prevent the security warnin
on opening. People still get to choose to disable the macros and g
straight to the worksheets.

Any thoughts

--
toocol
-----------------------------------------------------------------------
toocold's Profile: http://www.excelforum.com/member.php...fo&userid=3160
View this thread: http://www.excelforum.com/showthread.php?threadid=52285



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Protecting worksheets

Ok a much easier way that requires no code would be to go to
Tools--Macro--Security. Set the security to low. Doing this will
automatically open the document without a confirmation. Low security
should only be used if you are sure that the document is safe and you
can monitor who uses it. This should solve your problem. Let me know!

-Justin

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Protecting worksheets

oh and this will be applied to just the workbook you are in...you can
set this for each workbook you need.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Protecting worksheets

I'm sorry I was just confused. Theoretically, there is no way to
remove that dialog box. It is there to prevent users from opening
macros that could contain viruses. However, if you are aware of this
and can ensure that only safe documents will be opened from your
computer you do the following:

Go to Tools--Macro--Security.
Set the security to low.

Doing this will eliminate the confirmation dialog on open. However,
this will change it for every workbook, which I dont think you wanted.
Unfortunately this is the only option. I would also only do this if
you have some sort of security software installed as it will act as an
additional protection for your documents.

Sorry about my bad information before.

-Justin

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
Protecting Worksheets Pistols14 Excel Discussion (Misc queries) 7 November 27th 07 10:14 AM
Protecting Worksheets Kaitlin.uk Excel Discussion (Misc queries) 1 January 18th 07 02:21 PM
protecting worksheets David Harrison Excel Discussion (Misc queries) 3 December 17th 06 09:28 PM
Protecting worksheets keiron James Excel Worksheet Functions 1 September 13th 06 04:23 PM
Protecting Worksheets saturnin02 Excel Discussion (Misc queries) 9 January 23rd 05 06:10 PM


All times are GMT +1. The time now is 04:39 AM.

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

About Us

"It's about Microsoft Excel"