View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Anita Gray Anita Gray is offline
external usenet poster
 
Posts: 2
Default List box - how to uncheck box

Hello,

I have the following code to accompany a listbox.

My problem is that once a box is checked, it stays checked until I check
another box. I cannot check the same box a second time and have the
associated procedure run. I have to check another box to come back to
the original.

Does anybody know a way around this.

Thanks much,
Anita


Private Sub ListBox1_Click()
If ListBox1.Value = "depreciation" Then
MsgBox "You have chosen to update depreciation"
' Depreciation
ElseIf ListBox1.Value = "salaries" Then
MsgBox "You have chosen to update salaries"

ElseIf ListBox1.Value = "benefit %" Then
MsgBox "you have chosen to update the benefit %, continue?"

ElseIf ListBox1.Value = "payroll tax %" Then
MsgBox "you have chosen to update the payroll tax %, continue?"

ElseIf ListBox1.Value = "Vacation Accrual" Then
MsgBox "You have chosen to update Vacation Accrual"

ElseIf ListBox1.Value = "depreciation and vacation accrual" Then
MsgBox "You have chosen to update depreciation and vacation accrual"
ElseIf ListBox1.Value = "benefit % and payroll tax %" Then
MsgBox "You have chosen to update the benefit and payroll tax %'s"

End If

End Sub

A

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!