I just want to mention I am taking a VBA class right now and I am pretty terrible at it.
We have a homework problem that we need to import text from a text file and then loop through the text and make a count of all of the words within the text. The output will then be put in an Excel sheet with column A being the word and column B being the count. Variables already came defined which you can see in the attachment. Any help would be appreciated. I've been looking at this for a while and I just don't find VBA programming very intuitive.
Here is the starter code...
Like I said, the variables were already defined and I wrote the clear contents and the open file part myself. I understand that the Open fileName command is only bringing in the first line of the text file and adding that to the string dataLine. I was trying to do the problem with only one line of text to see if I could understand it, but I haven't had any luck. Attached is the original Excel file and text file.
Thanks in advance.
Bookmarks