Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-29-2013, 07:27 PM
skarden skarden is offline Userform label bordercolor not controllable if click label Windows XP Userform label bordercolor not controllable if click label Office 2003
Novice
Userform label bordercolor not controllable if click label
 
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
 

Tags
bordercolor, label, userform



Similar Threads
Thread Thread Starter Forum Replies Last Post
third partry label prowler_sn Excel 0 03-09-2012 01:18 AM
Label Problem flustered Word 1 01-16-2012 09:24 PM
Label template Will Word 3 10-31-2011 10:46 PM
Userform label bordercolor not controllable if click label Label Creation speloquin Word 1 05-27-2011 03:08 PM
Userform label bordercolor not controllable if click label Label merge sulasno Mail Merge 2 03-16-2011 01:55 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft