Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default problems resetting backcolor in listbox

I have a userform to allow the user to select the period to view. He
can either select a month or a quarter to view. I have two listboxes,
one for the months - lstMonths and one for the quarters - lstQuarters.
What I'd like to have happen is that when he clicks into one listbox,
the other box grays out. I'm trying to do it like this:

Private Sub lstMonth_Click()

lstMonth.BackColor = &H80000005 'White

lstQuarter.ListIndex = -1
lstQuarter.BackColor = &H8000000F 'Grey

End Sub

Private Sub lstQuarter_Click()

lstQuarter.BackColor = &H80000005 'White

lstMonth.ListIndex = -1
lstMonth.BackColor = &H8000000F 'Grey

End Sub

When the userform comes up the first time, both boxes have a white
background. When I click on one of them, the other one does go gray.
But when I click on the other one, both of them are grey and they stay
that way.

Any ideas?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet backcolor within range Stanley Excel Discussion (Misc queries) 2 January 25th 06 09:33 PM
Excell FileOPenDialog from another App, and listbox multiselect problems What-a-Tool Excel Programming 6 October 2nd 04 02:29 PM
Changing backcolor of commandbutton scottnshelly[_21_] Excel Programming 2 April 22nd 04 11:27 PM
Pivot DataRange BackColor Charly[_3_] Excel Programming 2 April 18th 04 02:08 PM
BackColor property code Joe Mathis Excel Programming 3 December 9th 03 04:11 PM


All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"