LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Macro for blocker from using cell range

Thanks and good luck with project.


Gord

On Wed, 24 Mar 2010 10:30:02 -0700, Lenny
wrote:

"Lenny" replied:
Gord - many thanks for taking the time to see this thread thru. You have
been most helpful.... regards

"Gord Dibben" wrote:

In Excel, customizations to Menus and Toolbars are stored in your
Excelxx.xlb file.

Other users will not have your customized Toolbar because they have their
own *.xlb

I suugest using code in your Template to create the Toolbar.

That code will pass to the workbooks created from the Template.

See Debra Dalgleish's site for code by Dave Peterson to build and destroy a
Toolbar.

http://www.contextures.on.ca/xlToolbar02.html


Gord

On Tue, 23 Mar 2010 12:58:01 -0700, Lenny
wrote:

"lenny" replied: May I ask another question, based on what I need to
accomplish with the code below?

I have been setting up Word templates for years and understand the
relationship between the master or user group template and the saved .doc.
Our IT department sets up each computer so the 'templates' are accessed thru
each of the programs FILENEW.

Excel as a vehicle for e-forms is relatively new. It seems a lot of the
coding is different between Word and Excel.. I'm trying to understand if
Excel has the same relationship with it's offspring files as word, especially
in regards to vb programming. My company stores all electronic form templates
(word, excel) on a server. Code, when written or copied directly into the vb
editor of a .xls file, seems to stay put, but I noticed that the custom
toolbar I created in the .xls file
disappeared from the VIEWTOOLBARS dropdown. I read in an obit that custom
toolbars do not pass with the files created off the master template. Is
there any way to override this? Are key combinations lost also? I recently
discovered that if I create these items directly in a Word (.doc)... they
pass to subsequent files created and was wondering if there was a way to
accomplish this in Excel also. Thank you for taking the time to read my
post.... regards - Lenny


"Gord Dibben" wrote:

If you don't want to assign a range name just work off locked or unlocked
cells.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Locked = True Then
With Me
.Protect Password:="justme"
.EnableSelection = xlNoRestrictions
End With
Else
If Target.Locked = False Then
Me.Unprotect Password:="justme"
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub


Gord

On Tue, 23 Mar 2010 09:10:16 -0700, Lenny
wrote:

Is there a way to write code that can unlock a worksheet (w/password)
allowing the user access to functionality while relocking (w/password) the
worksheet should the user mouse click or move into a range of cells that
would normally be locked?

Assistance and a learning opportunity is always appreciated...

Regards, Lenny

.


.




 
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
Run Macro when a cell within a range changes Mik Excel Programming 3 July 20th 09 01:49 PM
macro to select range from active cell range name string aelbob Excel Programming 2 July 14th 08 09:19 PM
Shift held too long key blocker on can't get it off - help! plumber1 Excel Discussion (Misc queries) 4 December 14th 05 12:25 AM
Macro to add text in Cell (in a range of Row) herve[_6_] Excel Programming 2 October 7th 05 10:44 AM
Macro - Cell reference - (Range) Alex Martinez Excel Programming 1 October 6th 05 08:17 AM


All times are GMT +1. The time now is 04:55 PM.

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"