Current Scenario: I'm using drop down boxes to select a product number from the list. The number of items in the list will exceed 100.
Prefereably I would like the user to be able to:
1) Enter the number into a Control Text box
2) When the user clicks a CommandButton the value entered is read and opens the file for that product number.
MY QUESTION: (from a vba novice) I haven't used this type of function and am asking for assistance for coding to complete items 1 & 2?
Sub Reset1()
ActiveSheet.DropDowns("Drop Down 2"
.Value = 1
ActiveSheet.DropDowns("Drop Down 3"
.Value = 1
ActiveSheet.DropDowns("Drop Down 4"
.Value = 1
ActiveSheet.DropDowns("Drop Down 5"
.Value = 1
Sub MainButtonQA()
If ActiveSheet.DropDowns("Drop Down 2"
.Value > 1 Then
ChDir "C:\Documents and Settings\rg42735\Desktop"
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rg42735\Desktop\Copy of ECN 100140D0 Face Page", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1))
ElseIf ActiveSheet.DropDowns("Drop Down 3"
.Value > 1 Then
ChDir "C:\Documents and Settings\rg42735\Desktop"
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rg42735\Desktop\Copy of ECN 100150D0 Face Page", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1))
ElseIf ActiveSheet.DropDowns("Drop Down 4"
.Value > 1 Then
ChDir "C:\Documents and Settings\rg42735\Desktop"
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rg42735\Desktop\Copy of ECN 100160D0 Face Page", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1))
End If
End Sub
Prefereably I would like the user to be able to:
1) Enter the number into a Control Text box
2) When the user clicks a CommandButton the value entered is read and opens the file for that product number.
MY QUESTION: (from a vba novice) I haven't used this type of function and am asking for assistance for coding to complete items 1 & 2?
Sub Reset1()
ActiveSheet.DropDowns("Drop Down 2"
ActiveSheet.DropDowns("Drop Down 3"
ActiveSheet.DropDowns("Drop Down 4"
ActiveSheet.DropDowns("Drop Down 5"
Sub MainButtonQA()
If ActiveSheet.DropDowns("Drop Down 2"
ChDir "C:\Documents and Settings\rg42735\Desktop"
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rg42735\Desktop\Copy of ECN 100140D0 Face Page", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1))
ElseIf ActiveSheet.DropDowns("Drop Down 3"
ChDir "C:\Documents and Settings\rg42735\Desktop"
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rg42735\Desktop\Copy of ECN 100150D0 Face Page", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1))
ElseIf ActiveSheet.DropDowns("Drop Down 4"
ChDir "C:\Documents and Settings\rg42735\Desktop"
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rg42735\Desktop\Copy of ECN 100160D0 Face Page", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1))
End If
End Sub