Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA How to Reset a List box


I have a user Data Entry FORM where the user must input 14 values.
Only one of the 14 values is a list box ( where the user can select one
value from the list) the other 13 being a mixture of Text and numeric
input.
If the user makes a serious mistake and wants to restart from scratch
they can use the CANCEL button to clear down all the data they have
entered and start again.
The 13 data field sare clearing down OK BUT how do I reset the list box
back to the start of the list of choices?

Grrrrrrr. Can't find this info any where!

Help please!


--
wejofost
------------------------------------------------------------------------
wejofost's Profile: http://www.excelforum.com/member.php...o&userid=30917
View this thread: http://www.excelforum.com/showthread...hreadid=505934

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default VBA How to Reset a List box

Hello wejofost,

try
Me.ListBox.Clear (this completely clear the listbox)

then re-initialize the listbox by using the addItem method

Rick

"wejofost" wrote in
message ...

I have a user Data Entry FORM where the user must input 14 values.
Only one of the 14 values is a list box ( where the user can select one
value from the list) the other 13 being a mixture of Text and numeric
input.
If the user makes a serious mistake and wants to restart from scratch
they can use the CANCEL button to clear down all the data they have
entered and start again.
The 13 data field sare clearing down OK BUT how do I reset the list box
back to the start of the list of choices?

Grrrrrrr. Can't find this info any where!

Help please!


--
wejofost
------------------------------------------------------------------------
wejofost's Profile:

http://www.excelforum.com/member.php...o&userid=30917
View this thread: http://www.excelforum.com/showthread...hreadid=505934



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA How to Reset a List box


Here is the Cleardata function.

I tried Me.ListBox.Clear but it doesn't crack it.

Here is the code. First line of List Box data ( Select location ) is in
A100.

Private Sub ClearData()
' Clear down all data fields before user starts input.
'
' lstTCRef.Text = Cells(a100)
txtArticle.Text = ""
txtQty.Text = ""
txtOriginalROP.Text = ""
txtOriginalTS.Text = ""
txtNewROP.Text = ""
txtNewTS.Text = ""
' Me.ListBox.Clear
' Me.lstTCRef.Clear

End Sub


Any Clues?
Thank you for your help.

Wej Parry


--
wejofost
------------------------------------------------------------------------
wejofost's Profile: http://www.excelforum.com/member.php...o&userid=30917
View this thread: http://www.excelforum.com/showthread...hreadid=505934

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
Need Macro to reset dependent list Bean Counter[_2_] Excel Discussion (Misc queries) 2 May 12th 10 06:07 PM
Reset Validation cells to first list value FirstVette52 Excel Discussion (Misc queries) 6 February 1st 09 04:57 PM
Using an Excel macro to reset a drop down list BrucenAZ Excel Discussion (Misc queries) 2 November 17th 08 04:06 PM
reset to zero baldyheed Excel Worksheet Functions 3 October 2nd 05 03:30 AM
reset me cacique[_5_] Excel Programming 1 July 8th 05 02:54 AM


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

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"