LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default List Box - Option If wrongly selected

In general what I am trying to achieve, is once an item has been selected, a
message box appears for conformation which works, unfortunately if the item
selected is incorrect, is to close the message box and restart from list box,
this sorts of work though it remembers the list box original value which is
is incorrect us aready stated. Also during second time round which is
activated by an Ok command button rather than just highlighting the value
which works first time round.
Attached is a copy of what was produced, would somebody explain where I have
gone wrong please & wheter I should be using a loop system & wheter stating
the list box values is applicable? Which is actually being read from a
seperate worksheet sheet, also I'd like the message box to only appear once
during conformation.


Sub ListBox1_Click()
MsgBox "You Have Selected_" & ListBox1.Value & "_Do You Wish To Continue?",
vbYesNo
UserForm1.Hide

If MsgBox("Continue?", vbYesNo) < vbYes Then
Call UserForm1_Click

ElseIf ListBox1.Value = "400kV" Then
Call GIS_Voltage1_Sorter

ElseIf ListBox1.Value = "300kV" Then
Call GIS_Voltage1_Sorter

ElseIf ListBox1.Value = "230kV" Then
Call GIS_Voltage1_Sorter

ElseIf ListBox1.Value = "130kV" Then
Call GIS_Voltage_Sorter

ElseIf ListBox1.Value = "66kV" Then
Call GIS_Voltage_Sorter

ElseIf ListBox1.Value = "33kV" Then
Call S33kV_Sorter

ElseIf ListBox1.Value = "11kV" Then
Call S11kV_Sorter

ElseIf ListBox1.Value = "Ancillary" Then
Call Ancillary_Sorter

ElseIf ListBox1.Value = "Master" Then
Call Master_Sorter

End If

Call UserForm1_Click

End Sub


 
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
removing drop down option after its been selected bbennett2 Excel Worksheet Functions 4 December 10th 08 01:40 AM
A validated List which link to selected cells according to what is selected on the list WL Excel Worksheet Functions 1 June 5th 06 08:52 PM
Option Button - multiple selected alanap Excel Worksheet Functions 1 April 17th 06 11:04 PM
Having a macro recognize when an option button has been selected Linking to specific cells in pivot table Excel Programming 3 August 26th 05 05:21 PM
Checking to see if user selected an Option Kirk[_2_] Excel Programming 1 August 27th 03 09:46 PM


All times are GMT +1. The time now is 09:05 AM.

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

About Us

"It's about Microsoft Excel"