#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 108
Default list box

I have a list of items in a worksheet. The worksheet uses this list via
validation to allow to have a drop down menu in some of the cells. I also
have a userform that uses this list to populate a listbox. When I open the
userform I have coding that allows me to select an item on the worksheet
using the listbox. The problem is when I close the userform and want to use
the worksheet validation cells to select an item excel jumps to the start of
the validation list.

Here is the code for the list box:
Private Sub CommandButton1_Click()
With activeworksheet
ActiveCell.Select
ActiveCell.Offset(0, 5).Select
If ActiveCell = "Yes" Then
ActiveCell.Offset(0, -1).Select
ActiveCell.ClearContents
Else
MsgBox "Cannot Reset"
End If
End With
End Sub

Private Sub CommandButton2_Click()
UserForm1.Hide
End Sub

Private Sub ListBox1_Click()
With activeworksheet
Range("Part")(UserForm1.ListBox1.ListIndex + 1).Select
End With
End Sub

Commandbutton2 closes the form
Commandbutton1 resets some information

Can anyone help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
D. D. is offline
external usenet poster
 
Posts: 53
Default list box


Not sure what you mean, do you mean data validation doesn't update?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 108
Default list box

Its ok i figured it out.

"D." wrote:


Not sure what you mean, do you mean data validation doesn't update?


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
List for AutoFilter and list for Subtotals have different meanings? Epinn New Users to Excel 2 August 18th 06 09:02 PM
Filter the results of a list based on a previous vlookup against the same list Mizpah Excel Worksheet Functions 2 August 18th 06 10:28 AM
Creating a List based on your choice from Another List Cristi Excel Discussion (Misc queries) 1 August 14th 06 06:00 PM
How to link data from one drop-down list to another dolfijntje33 Excel Worksheet Functions 6 May 19th 06 07:40 PM
Refresh a Validation List? jhollin1138 Excel Discussion (Misc queries) 3 February 17th 05 05:48 PM


All times are GMT +1. The time now is 06:52 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"