Format Selection
Sub GoFormat()
FT = Array("General", "#,##0", "#,##0.00")
Align.FormatX.List = FT
Align.FormatX.ListIndex = 0
Align.Show
End Sub
Sub ChangeFmt(Afmt)
With Selection
.NumberFormat = Afmt
.HorizontalAlignment = xlRight
End With
End Sub
###############FORM####################################
Private Sub CommandButton1_Click()
ChangeFmt Align.FormatX.Value
End Sub
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} Align
Caption = "UserForm1"
ClientHeight = 3015
ClientLeft = 120
ClientTop = 465
ClientWidth = 4560
OleObjectBlob = "Align.frx":0000
ShowModal = 0 'False
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "Align"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CommandButton1_Click()
ChangeFmt Align.FormatX.Value
End Sub