Can someone please give me some newbie advice on how to make a VBA calendar entry date to show up as centered rather than right jusitified?
Here is the sheet code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 4 Then
ActiveCell.Clear
End If
If Target.Column = 4 Then
UserForm1.Show
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
Here is the module code
Sub opencalendar()
UserForm1.Show
End Sub
Here is the User Form code
Private Sub UserForm_Initialize()
If IsDate(ActiveCell.Value) Then
calender1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Date
End If
End Sub
Private Sub Calendar1_Click()
ActiveCell.Value = Calendar1.Value
Unload Me
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Here is the sheet code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 4 Then
ActiveCell.Clear
End If
If Target.Column = 4 Then
UserForm1.Show
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
Here is the module code
Sub opencalendar()
UserForm1.Show
End Sub
Here is the User Form code
Private Sub UserForm_Initialize()
If IsDate(ActiveCell.Value) Then
calender1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Date
End If
End Sub
Private Sub Calendar1_Click()
ActiveCell.Value = Calendar1.Value
Unload Me
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub