Import text file with lines of variable length into Excel using VBA

I have a VBA enabled sheet with buttons that perform various tasks including dumping 4 lines of IP addresses into a text file. A sample text file is below:

192.168.44.12
192.168.44.123
192.168.33.111
192.168.44.1

At the end of my run, it reads the contents of the text file and places each line in specific fields (not in row vertically) in the sheet.

Right now I'm able to do this if I already know the length each line but it will be different each time.

Can anyone help?

Import text file with lines of variable length into Excel using

Why don't you create a variable of string type and then use the len() function? So you will know actual lenghts of that lines.