Thread: Excel Macro
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TheQuickBrownFox TheQuickBrownFox is offline
external usenet poster
 
Posts: 8
Default Excel Macro

Could you examine my "Making drop down selection lists" post, please,
and tell me if it is possible?

On Sun, 28 Jun 2009 09:05:01 -0700, Shane Devenshire
wrote:


Hi,

1. Choose Tools, Customize, Commands tab, Macros category, drag the Custom
Button on to any toolbar.
2. With the Customize dialog box open right-click the new button and choose
Assign Macro and pick ChangeCase_Show().

I might also add a shortcut key for the macro, and change the button Name
and Picture, but they are not necessary.

I would also modify your code to read:

Option Explicit
Dim Cell As Range

Sub ChangeCase_Show()
frmCase.Show
End Sub

Sub DoCaseChange()
If frmCase.optLower = True Then
LowerCase
ElseIf frmCase.optUpper = True Then
UpperCase
Else
TitleCase
End If
End Sub

Sub LowerCase()
For Each Cell In Selection
Cell = LCase(Cell)
Next Cell
End Sub

Sub UpperCase()
For Each Cell In Selection
Cell = UCase(Cell)
Next Cell
End Sub

Sub TitleCase()
For Each Cell In Selection
Cell = Application.Proper(Cell)
Next Cell
End Sub