PC Review


Reply
Thread Tools Rate Thread

Creating a list box

 
 
Decreenisi
Guest
Posts: n/a
 
      8th Jan 2008
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
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      8th Jan 2008
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


"Decreenisi" <(E-Mail Removed)> wrote in message
news:afd42f6e-2b79-436c-8063-(E-Mail Removed)...
>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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Distribution List With Multiable Contact List Nilotic Deva Microsoft Outlook Contacts 1 25th Sep 2008 01:30 AM
Creating a list from previously selected list =?Utf-8?B?U2FyYSBTdW4=?= Microsoft Excel Programming 2 8th Mar 2007 06:43 AM
Creating a Detailed List from a Summary List carlsondaniel@gmail.com Microsoft Excel Worksheet Functions 0 7th Sep 2006 12:36 AM
Creating Distro List Within Address List Group Hoochy Microsoft Outlook 0 11th Jun 2004 09:03 PM
creating a drop-down list in a cell (NOT a combo or list box) Carrie Microsoft Excel Worksheet Functions 4 29th Jul 2003 05:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:58 PM.