Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
List box - how to uncheck box
im not sure about this but it might be something to do with setting th
focus like this ListBox1.Value = "" Listbox1.Setfocus Dont take my word for it though as ive only been at this for about weeks myself. hope its useful, Simo -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
check and uncheck macro | Excel Worksheet Functions | |||
check and uncheck macro | Excel Discussion (Misc queries) | |||
Uncheck a box | Excel Discussion (Misc queries) | |||
Uncheck check boxes | Excel Discussion (Misc queries) | |||
Check / Uncheck Box | Setting up and Configuration of Excel |