View Single Post
 
Old 09-29-2013, 07:27 PM
skarden skarden is offline Windows XP Office 2003
Novice
 
Join Date: Dec 2011
Location: Orlando, FL
Posts: 27
skarden is on a distinguished road
Smile Solution Found

As the inside "date" box is smaller than the back box, if the back box was on top it should have blocked out the date. Likewise, if the inner date box was on top it doesn't overlap the bigger back box beneath it.

However, somehow clicking on the back box changes the "z" order. I found this code fixed the problem:

Private Sub MouseOver_Day(sD As String)
For i = 1 To 42
If i = sD Then
Controls("d" & i & "Back").BorderColor = &HFF0000 'Blue
Controls("d" & i & "Back").BackColor = &HFFFFC0 'Light Blue
Controls("d" & i).BackColor = &HFFFFC0 'Light Blue
Controls("d" & i & "Back").ZOrder (0) 'Brings Back to front
Controls("d" & i).ZOrder (1) 'Sends Date to back
Controls("d" & i & "Back").ZOrder (1) 'Brings Back to back
Controls("d" & i).ZOrder (0) 'Sends Date to front
Else
If Controls("d" & i & "Back").BorderColor <> &HFFFFFF Then 'White
Application.ScreenUpdating = False
Controls("d" & i & "Back").BorderColor = &HFFFFFF 'White
Controls("d" & i & "Back").BackColor = &HFFFFFF 'White
Controls("d" & i).BackColor = &HFFFFFF 'White
Controls("d" & i & "Back").ZOrder (1) 'Sends Back to Back
Controls("d" & i).ZOrder (0) 'Sends Date to Front
Application.ScreenUpdating = True
End If
End If
Next i
End Sub
Reply With Quote