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

Hello,

I've read dozens of posts regarding this issue however, I am at a loss.

It is mandatory that I have the worksheet protected so that data is only
entered via VB userform. I have tried the Workbook_Open() and it is not
being executed. I replaced the code with a MsgBox and confirmed it is not
being run. The macro is being invoked via mouseclick (no shift key). Where
else would I place UserInterfaceOnly?

Thanks,
Richard

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Protection in VB

Send us the code and let us know where you are placing it?

"Richard" wrote:

Hello,

I've read dozens of posts regarding this issue however, I am at a loss.

It is mandatory that I have the worksheet protected so that data is only
entered via VB userform. I have tried the Workbook_Open() and it is not
being executed. I replaced the code with a MsgBox and confirmed it is not
being run. The macro is being invoked via mouseclick (no shift key). Where
else would I place UserInterfaceOnly?

Thanks,
Richard

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Protection in VB

If you are using xl2002 or later and your security is set to high, then
macros are disabled without warning unless you have certified your code and
your certification has been accepted as a trusted source.

If that is what is happening, then I doubt using some other approach is
going to overcome it.

--
Regards,
Tom Ogilvy

"Richard" wrote in message
...
Hello,

I've read dozens of posts regarding this issue however, I am at a loss.

It is mandatory that I have the worksheet protected so that data is only
entered via VB userform. I have tried the Workbook_Open() and it is not
being executed. I replaced the code with a MsgBox and confirmed it is not
being run. The macro is being invoked via mouseclick (no shift key).

Where
else would I place UserInterfaceOnly?

Thanks,
Richard



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Protection in VB

Private Sub Workbook_Open()
MsgBox "It Works!"
End Sub

I don't quite understand the question, placing it? It is in my main code
window.

"cush" wrote:

Send us the code and let us know where you are placing it?

"Richard" wrote:

Hello,

I've read dozens of posts regarding this issue however, I am at a loss.

It is mandatory that I have the worksheet protected so that data is only
entered via VB userform. I have tried the Workbook_Open() and it is not
being executed. I replaced the code with a MsgBox and confirmed it is not
being run. The macro is being invoked via mouseclick (no shift key). Where
else would I place UserInterfaceOnly?

Thanks,
Richard

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Protection in VB

Confirmed; macros are not set too high. Each time the sheet opens, it asks.

"Tom Ogilvy" wrote:

If you are using xl2002 or later and your security is set to high, then
macros are disabled without warning unless you have certified your code and
your certification has been accepted as a trusted source.

If that is what is happening, then I doubt using some other approach is
going to overcome it.

--
Regards,
Tom Ogilvy

"Richard" wrote in message
...
Hello,

I've read dozens of posts regarding this issue however, I am at a loss.

It is mandatory that I have the worksheet protected so that data is only
entered via VB userform. I have tried the Workbook_Open() and it is not
being executed. I replaced the code with a MsgBox and confirmed it is not
being run. The macro is being invoked via mouseclick (no shift key).

Where
else would I place UserInterfaceOnly?

Thanks,
Richard






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Protection in VB

I think what he means by placing it, is it is code for a sheet, ie
Sheet1, or in a module, or in the ThisWorkbook module. In order for the
Workbook_Open to fire correctly, it needs to be in the ThisWorkbook
module. Also make sure that the cells are actually locked, by checking
the properties of the cells. Right click cells, Format Cells, Protection
tab, the Locked property should be on.

*** Sent via Developersdex http://www.developersdex.com ***
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
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
WS Protection: Different Levels of Protection on Different Ranges Carmi Excel Discussion (Misc queries) 4 August 31st 07 02:26 PM
Cell Protection vs. Worksheet Protection kmwhitt Excel Discussion (Misc queries) 4 September 24th 06 02:37 AM
Worksheet protection is gone and only wokbook protection can be se Eric C. Excel Discussion (Misc queries) 4 May 2nd 06 04:50 PM


All times are GMT +1. The time now is 03:01 PM.

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"