Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run Macro when a cell within a range changes | Excel Programming | |||
macro to select range from active cell range name string | Excel Programming | |||
Shift held too long key blocker on can't get it off - help! | Excel Discussion (Misc queries) | |||
Macro to add text in Cell (in a range of Row) | Excel Programming | |||
Macro - Cell reference - (Range) | Excel Programming |