View Single Post
  #18   Report Post  
Posted to microsoft.public.excel.misc
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Customising date format

GS wrote:

I'm new to this version after 16 years with Excel 2000, the last
decade or so of which was very infrequent use, so thanks for your
patience


The VBE has remained the same since v2000. Beginning in v2010 VBA7
is used; VBA6 persists for v2000 to v2007.


Thanks Gary, that's true, the VBE seems to be the only familiar
environment! It's the main app that I find daunting. Is there any way
to get a sort of 'classic' or 'legacy' look, with the familiar menus?
At least until I get more comfortable using the numerous and densely
populated 'ribbons'?


Yep.., J-Walk has offered this since v2007...


Sub ToggleOldMenus(Reset As Boolean) 'adapted from sample by J-Walk
' Adds the early Menubar and Standard/Formatting bars to XL12+
If Application.VERSION < 12 Then Exit Sub
Dim cBar As CommandBar, ctl As CommandBarControl, sz, vBars, v, n&,
j&

Const sOldBars$ = "Built-In
Menus|OldMenus,Standard|EarlyStandard,Formatting|E arlyFormatting"
vBars = Split(sOldBars, ",")

For n = LBound(vBars) To UBound(vBars)
v = Split(vBars(n), "|")
'Delete it, if it exists
On Error Resume Next: CommandBars(v(1)).Delete: On Error GoTo 0

If Reset Then
' Set cBar = CommandBars.Add(v(1)) '//puts bars on separate rows
'Puts Standard/Formatting controls on the same row
If n < 2 Then Set cBar = CommandBars.Add(v(1))

If cBar.name = "OldMenus" Then
GoTo addBuiltinMenus
Else
For j = 1 To CommandBars(v(0)).Controls.Count
CommandBars(v(0)).Controls(j).Copy cBar
Next 'j
End If 'cBar.name = "OldMenus"
moreCbars:
cBar.Visible = True
End If 'Reset
Next 'n

normalexit:
Exit Sub

addBuiltinMenus:
'Copy the controls from Excel's "Built-in Menus" shortcut menu
With CommandBars("Built-in Menus")
.Controls("&File").Copy cBar
.Controls("&Edit").Copy cBar
.Controls("&View").Copy cBar
.Controls("&Insert").Copy cBar
.Controls("F&ormat").Copy cBar
.Controls("&Tools").Copy cBar
.Controls("&Data").Copy cBar
.Controls("&Window").Copy cBar
.Controls("&Help").Copy cBar
End With
GoTo moreCbars
End Sub

...which will persist until you delete them.

To create: ToggleOldMenus True

To remove: ToggleOldMenus False

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion