Novicelearner
New Member
- Joined
- Nov 29, 2017
- Messages
- 5
Hi. Im quite new to vba excel. Is there a way for me to prevent duplicate from being imported using any code or method. Below is the code that i will be using.
ChDir "Open from directory
sales = Application.GetOpenFilename("Text Files (*.txt), *.txt")
Workbooks.OpenText Filename:=sales _
, Origin:=437, StartRow:=4, DataType:=xlFixedWidth, FieldInfo:=Array( _
Array(0, 1), Array(11, 1), Array(23, 1), Array(28, 1), Array(43, 1), Array(53, 1)), _
TrailingMinusNumbers:=True
ActiveSheet.Move Before:=Workbooks("sales Update.xlsm").Sheets(1)
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Thanks.
ChDir "Open from directory
sales = Application.GetOpenFilename("Text Files (*.txt), *.txt")
Workbooks.OpenText Filename:=sales _
, Origin:=437, StartRow:=4, DataType:=xlFixedWidth, FieldInfo:=Array( _
Array(0, 1), Array(11, 1), Array(23, 1), Array(28, 1), Array(43, 1), Array(53, 1)), _
TrailingMinusNumbers:=True
ActiveSheet.Move Before:=Workbooks("sales Update.xlsm").Sheets(1)
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Thanks.