Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last Textbox/Combo on Form

Status
Not open for further replies.

vbaprogammer

Programmer
Sep 16, 1999
59
US
I have textboxes on a form, some of which are coded to change the background color in the Enter and Exit event. The last textbox on the form, however, does not change the background color on Exit (tabbing out of textbox to next control, which is a command button). I have tried many different properties, including format, but it never works in the last control on a form. These controls are on a page of a multipage control.

Can anyone provide a workaround for this problem?

(Or maybe someone has a class or code for changing properties for multiple controls ... in Word 97 ... can't use DLLs and WithEvents is not available)

Private Sub ddOffice_Enter()
Me.ddOffice.BackColor = &HC0FFFF
End Sub
Private Sub ddOffice_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.ddOffice.BackColor = &H80000005
End Sub

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top