Creating a list box

D

Decreenisi

I have the following code attached to a button :-

find next line for data entry
Dim CurrentRow As Integer 'this variable will be changed
according to the row being searched
CurrentRow = 13

Do
CurrentRow = CurrentRow + 1
Loop While Worksheets("Concern Log").Range("B" & CurrentRow) <> ""
MsgBox ["Ensure you have available all relevent information for
current Rejects. You will be promted for specific information, if
you've no values to enter leave the box empty and press return. Click
OK to continue"], [0], ["Start"]
Worksheets("Concern Log").Range("A" & CurrentRow) = InputBox(["Please
Enter Reject Date..I.E (mm/dd/yy) If you do not wish to enter data at
this time please press CANCEL and you be returned to the main
Index...Note! IF YOU DO NOT ENTER ANY INFO THE MACRO WILL END, IF YOU
DON'T HAVE AN DATE THEN ENTER A DASH"], ["DATE"])
If Worksheets("Concern Log").Range("A" & CurrentRow) = "" Then Exit
Sub
Worksheets("Concern Log").Range("C" & CurrentRow) = InputBox(["Please
enter TG Kanban"], ["KANBAN"])
Worksheets("Concern Log").Range("G" & CurrentRow) = InputBox(["Please
enter HUM Ticket Number"], ["TICKET NUMBER"])
Worksheets("Concern Log").Range("H" & CurrentRow) = InputBox(["Please
enter Nunber of affected parts"], ["QTY"])
Worksheets("Concern Log").Range("I" & CurrentRow) = InputBox(["Please
enter Fault Description"], ["FAULT DESCRIPTION"])
Worksheets("Concern Log").Range("J" & CurrentRow) = InputBox(["Please
enter QRE Action"], ["QRE ACTION"])
MsgBox ["The database will now automatically update... If you want to
add data with another unique HUM ticket number PRESS DATA ENTRY
BUTTON.....Otherwise thank you for using REJECTION DATABASE (DM-05)"],
[0], ["AUTOMATIC UPDATE"]
End Sub



For the QRE Action Input box, I want to change Input box for a list
box does anyone have any ideas ????


Thanks
 
B

Bernie Deitrick

Create a userform with the list box, and load and show the userform at the correct point in the
macro: use the listbox to set a global variable that your macro can then use.

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top