ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   List box in macro (https://www.excelbanter.com/excel-programming/434763-list-box-macro.html)

Decreenisi[_2_]

List box in macro
 
Hi,

I have a macro attached to a button, as follows.

Worksheets("Concern Log").Range("H" & CurrentRow) = InputBox(["Please
enter Nunber of affected parts"], ["QTY"])
Worksheets("Concern Log").Range("I" & CurrentRow) = ListBox(["Please
enter Fault Description"], ["FAULT DESCRIPTION"])
Worksheets("Concern Log").Range("J" & CurrentRow) = InputBox(["Please
enter QRE Action"], ["QRE ACTION"])

This works fine, however instead of entering data in an Input Box, I
would like a list box so I can select data from a specific list. At
the end of the month when we review and sort data, if the descriptions
are not the same it skews the results.I.e (some write cork spli,
others write splitting cork)

I have tried typing in ListBox, but of course there is no way of
setting it up ect. Can anyone help.

Duncan

joel

List box in macro
 
have you tried type 8 in a input box?


Do
Set Response = Application.InputBox("Select cell", Type:=8)
If Not Application.Intersect(Validrange, Response) Is Nothing Then
MsgBox ("Ivalid Response, Please select your range again")
End If
Loop While Not Application.Intersect(Validrange, Response) Is Nothing

"Decreenisi" wrote:

Hi,

I have a macro attached to a button, as follows.

Worksheets("Concern Log").Range("H" & CurrentRow) = InputBox(["Please
enter Nunber of affected parts"], ["QTY"])
Worksheets("Concern Log").Range("I" & CurrentRow) = ListBox(["Please
enter Fault Description"], ["FAULT DESCRIPTION"])
Worksheets("Concern Log").Range("J" & CurrentRow) = InputBox(["Please
enter QRE Action"], ["QRE ACTION"])

This works fine, however instead of entering data in an Input Box, I
would like a list box so I can select data from a specific list. At
the end of the month when we review and sort data, if the descriptions
are not the same it skews the results.I.e (some write cork spli,
others write splitting cork)

I have tried typing in ListBox, but of course there is no way of
setting it up ect. Can anyone help.

Duncan



All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com