Hi,
I am using the below code to unzip and copy a excel file. but the following code is getting copied to new excel.
https://www.mrexcel.com/forum/excel-questions/984206-need-vba-download-copy-data-zip-file.html
But I need to copy on existing sheet from cell "I".
existing sheet: BSESTOCKS
I tried to edit the below code but getting errors like object required, subscript out of range, please help
With Workbooks.Open(Folder & CsvFile).Sheets(1)
.UsedRange.Columns(1).TextToColumns Destination:=.Cells(1), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, _
FieldInfo:=Array(Array(3, 4), Array(15, 4)), TrailingMinusNumbers:=True
' Autofit the widths
.UsedRange.Columns.AutoFit
' Copy sheet to the new workbook
.Copy
' Release (close) CsvFile
.Parent.Close False
End With
I am using the below code to unzip and copy a excel file. but the following code is getting copied to new excel.
https://www.mrexcel.com/forum/excel-questions/984206-need-vba-download-copy-data-zip-file.html
But I need to copy on existing sheet from cell "I".
existing sheet: BSESTOCKS
I tried to edit the below code but getting errors like object required, subscript out of range, please help
With Workbooks.Open(Folder & CsvFile).Sheets(1)
.UsedRange.Columns(1).TextToColumns Destination:=.Cells(1), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, _
FieldInfo:=Array(Array(3, 4), Array(15, 4)), TrailingMinusNumbers:=True
' Autofit the widths
.UsedRange.Columns.AutoFit
' Copy sheet to the new workbook
.Copy
' Release (close) CsvFile
.Parent.Close False
End With