Yes Doc Sir, I am getting that Error Again
Yes Doc Sir, I am getting that Error Again
Run this macro in the uploaded file ( remember to change the file path and name to suit )
Then save the file and return it to me
Code:Sub OpenSample2_csv_8June() ' Dim Ws1 As Worksheet: Set Ws1 = ThisWorkbook.Worksheets.Item(1) Dim FilePathandName As String Let FilePathandName = ThisWorkbook.Path & Application.PathSeparator & "Sample2.csv" ' ' CHANGE TO SUIT Dim FileNum As Long: Let FileNum = FreeFile(1) ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function Dim RwCnt As Long, TextFileLineIn As String Open FilePathandName For Input As #FileNum 'Open Route to data Do While Not EOF(FileNum) Line Input #FileNum, TextFileLineIn Let Ws1.Range("A" & Ws1.Range("A" & ActiveSheet.Rows.Count & "").End(xlUp).Row + 1 & "").Value = Left(TextFileLineIn, 4) Let Ws1.Range("B" & ActiveSheet.Range("B" & Ws1.Rows.Count & "").End(xlUp).Row + 1 & "").Value = Len(TextFileLineIn) Loop Close #FileNum End Sub
Test2csvContents.xls : https://app.box.com/s/2knx1msb84ga5phpictm0c6bjcdnai6f
Last edited by DocAElstein; 06-08-2020 at 08:26 PM.
….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
If you are my enemy, we will try to kick the fucking shit out of you…..
Winston Churchill, 1939
Save your Forum..._
_...KILL A MODERATOR!!
Plz See
Please use the file I uploaded
https://excelfox.com/forum/showthrea...ll=1#post13591
and after running the macro, return the file to me
( change the path to suit in the macro in the uploaded file )
Last edited by DocAElstein; 06-08-2020 at 09:15 PM.
….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
If you are my enemy, we will try to kick the fucking shit out of you…..
Winston Churchill, 1939
Save your Forum..._
_...KILL A MODERATOR!!
Plz see
You are not using the file that you uploaded in post #1
I need the file that you are using!!!
_____ Workbook: Test2csvContentsReturn.xls ( Using Excel 2007 32 bit )
Worksheet: Sheet1
Avinash File Yous are using Alan File You uploaded in post #1 NSE, 26NSE,30,6,<,12783,A,,,,,GTT NSE, 43NSE,101010,6,<,12783,A,,,,,GTT,,,,,,,,,,,,, NSE, 25NSE,28,6,<,1499,A,,,,,GTT NSE, 39NSE,22,6,<,12783,A,,,,,GTT,,,,,,,,,,,,, NSE, 25NSE,25,6,<,3282,A,,,,,GTT NSE, 42NSE,17388,6,<,12783,A,,,,,GTT,,,,,,,,,,,,, NSE, 24NSE,22,6,<,382,A,,,,,GTT ,100 26,100,,,,,,,,,,,,,,,,,,,,,, ,25, 25,25,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 53,,,,,,,,,,,,,Only for understanding purpose,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 46,,,,,,,,,,,,,Before runing the macro,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 43,,,,,,,,,,,,,NSE,101010,6,<,12783,A,,,,,GTT ,,,, 39,,,,,,,,,,,,,NSE,22,6,<,12783,A,,,,,GTT ,,,, 42,,,,,,,,,,,,,NSE,17388,6,<,12783,A,,,,,GTT ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 45,,,,,,,,,,,,,After runing the macro,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 23,,,,,,,,,,,,,,,,,,,,,,, ,,,, 43,,,,,,,,,,,,,NSE,101010,6,<,12783,A,,,,,GTT ,,,, 39,,,,,,,,,,,,,NSE,22,6,<,12783,A,,,,,GTT ,,,, 42,,,,,,,,,,,,,NSE,17388,6,<,12783,A,,,,,GTT ,,,, 26,,,,,,,,,,,,,,100,,,,,,,,, ,,,, 25,,,,,,,,,,,,,,25,,,,,,,,,
….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
If you are my enemy, we will try to kick the fucking shit out of you…..
Winston Churchill, 1939
Save your Forum..._
_...KILL A MODERATOR!!
My macro assumed you had in the first field of the text file
NSE
But your latest file has either
NSE
Or
"NSE
This is your latest file:
NSE,101010,6,<,12783,A,,,,,GTT
NSE,22,6,<,12783,A,,,,,GTT
NSE,17388,6,<,12783,A,,,,,GTT
"NSE,",30,,,,,,,,,
"NSE,",26,,,,,,,,,
"NSE,",29,,,,,,,,,
But that does not explain the error that you showed here : https://excelfox.com/forum/showthrea...ll=1#post13530 )
My best guess is that the problem is that you have no idea most of the time what files you are using, since, for example this was rubbish: So the original error ( https://excelfox.com/forum/showthrea...ll=1#post13530 ) , probably came because you were using a different file again!!!
So far you have been using at least 3 different files and telling me that they are the same one!!!
_____ Workbook: Test2csvContents.xls ( Using Excel 2007 32 bit )
Worksheet: Sheet1
Text file You uploaded in post #15 text file You were using post #13 Text file You uploaded in post #1 NSE,101010,6,<,12783,A,,,,,GTT NSE,30,6,<,12783,A,,,,,GTT NSE,101010,6,<,12783,A,,,,,GTT,,,,,,,,,,,,, NSE,22,6,<,12783,A,,,,,GTT NSE,28,6,<,1499,A,,,,,GTT NSE,22,6,<,12783,A,,,,,GTT,,,,,,,,,,,,, NSE,17388,6,<,12783,A,,,,,GTT NSE,25,6,<,3282,A,,,,,GTT NSE,17388,6,<,12783,A,,,,,GTT,,,,,,,,,,,,, "NSE,",30,,,,,,,,, NSE,22,6,<,382,A,,,,,GTT ,100,,,,,,,,,,,,,,,,,,,,,, "NSE,",26,,,,,,,,, ,25,,,,,,,,,,,,,,,,,,,,,, "NSE,",29,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,Only for understanding purpose,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,Before runing the macro,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,NSE,101010,6,<,12783,A,,,,,GTT ,,,,,,,,,,,,,NSE,22,6,<,12783,A,,,,,GTT ,,,,,,,,,,,,,NSE,17388,6,<,12783,A,,,,,GTT ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,After runing the macro,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,NSE,101010,6,<,12783,A,,,,,GTT ,,,,,,,,,,,,,NSE,22,6,<,12783,A,,,,,GTT ,,,,,,,,,,,,,NSE,17388,6,<,12783,A,,,,,GTT ,,,,,,,,,,,,,,100,,,,,,,,, ,,,,,,,,,,,,,,25,,,,,,,,,
Further....
In post #11 you must have used a different file to any of those 3, so we have at least 4 different files that you are using,
It continues to be almost impossible to help you because you either understand almost nothing I write, or you ignore almost all I write.
You quickly post rubbish in post replies.
You continue to waste everybody’s time, including your own!!
Last edited by DocAElstein; 06-08-2020 at 10:56 PM.
….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
If you are my enemy, we will try to kick the fucking shit out of you…..
Winston Churchill, 1939
Save your Forum..._
_...KILL A MODERATOR!!
I Used in post #13
is different
what i have done i placed the macro in a book1.xlsm file & i changed the path in the code & i got this result after runing the macro in book1.xlsm & save the book1.xlsm & sent u the book1.xlsm file
So that was my mistake i ran ur macro incorrectly
So, currently , at this point in time, I have no idea what you want because, as usual, you are posting a lot of mixed up rubbish.
I am happy to help further.
But you are going to have to try to explain in English what the problem is.
Take your time, and think carefully, and try to explain.
Stop posting quick nonsense replies.
No one anywhere can help if you continue to post a lot of mixed up rubbish in your replies.
Last edited by DocAElstein; 06-08-2020 at 11:32 PM.
….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
If you are my enemy, we will try to kick the fucking shit out of you…..
Winston Churchill, 1939
Save your Forum..._
_...KILL A MODERATOR!!
Bookmarks