To clarify just in case it makes a difference...the textbox ECNN is from the control toolbox and sits on a worksheet. All of the modules running reports are just that...listed as modules.
This is the code from the worksheet. Can I call the modules after opening the file, extract the data, and close the file?
If so, the following code is opening the file but not calling the module.
*Note: I have commented out some items that I am not using in this test.
Option Explicit
Public Sub GetData_Click()
' Dim ECNN As String
' ECNN = ECNN.Text
' Range("A1"
.Value = ECNN.Text
Workbooks.OpenText Filename:= _
"\Frg1Sharedit_docsAPPSJDPS PDM ImpECN Reports Under ConstructionWork In ProgressProduction Test Files" & _
Trim$(ECNN.Text) & "D0_Face.xls", 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))
Face_Page
End Sub
Thanks for suggestions,
John
This is the code from the worksheet. Can I call the modules after opening the file, extract the data, and close the file?
If so, the following code is opening the file but not calling the module.
*Note: I have commented out some items that I am not using in this test.
Option Explicit
Public Sub GetData_Click()
' Dim ECNN As String
' ECNN = ECNN.Text
' Range("A1"
Workbooks.OpenText Filename:= _
"\Frg1Sharedit_docsAPPSJDPS PDM ImpECN Reports Under ConstructionWork In ProgressProduction Test Files" & _
Trim$(ECNN.Text) & "D0_Face.xls", 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))
Face_Page
End Sub
Thanks for suggestions,
John