Hello all,
i'm really stuck on this one.
I have the following code...
Until now is fine and working very nicely for my level of skills with VBA...
but now i want to past what was copy from the opened file into the first line (column B ) that has the same value from the file opened “B2”…
Basically I need to find a match between the MASTER FILE (that open the other file) unknown row but column B and the OPENED FILE “B2” to set the destination to paste…
I hope I’ve made my self-clear on this one and I really appreciate any help or suggestions…
i'm really stuck on this one.
I have the following code...
Code:
Sub TesteSelect()
Dim myValue As Variant
myValue = InputBox("Give me some input")
Application.ScreenUpdating = False
Application.DisplayAlerts = False
ChDir "L:\..."
'1
Workbooks.OpenText Filename:= _
"L:\...\PRO " & myValue & ".txt" _
, Origin:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(1, 1), _
TrailingMinusNumbers:=True
Windows("pro " & myValue & ".txt").Activate
Rows("2:" & Range([A1], ActiveSheet.UsedRange).Rows.Count - 2).Copy
Windows("MASTER FILE_" & myValue & ".xlsm").Activate
Worksheets("pro").Activate
'paste CODE
'paste CODE
'paste CODE
'paste CODE
'Windows("pro " & myValue & ".txt").Close
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
Until now is fine and working very nicely for my level of skills with VBA...
but now i want to past what was copy from the opened file into the first line (column B ) that has the same value from the file opened “B2”…
Basically I need to find a match between the MASTER FILE (that open the other file) unknown row but column B and the OPENED FILE “B2” to set the destination to paste…
I hope I’ve made my self-clear on this one and I really appreciate any help or suggestions…