I have been trying all day to do something pretty simple. I am an absolute newbie with VB so I am sure I've missed something.
I have been trying to use MID
to split up the numbers in a column on a spreadsheet.
Here is what I have so far (I have been trying to do only one to make sure it works):
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open("C:\Documents and Settings\<username>\Desktop\New.csv")
Set objWorksheet = objWorkbook.Worksheets(1)
objWorksheet.Activate
sub_str = Mid(A1, 1, 4)
So the application opens, the worksheet is active, then... nothing. No error or anything. It's like it literally stops there and ignores the last line altogether. The numbers that I want to split look like the below in Excel. They are just dates that are backwards, hence the wanting to split, so I can separate and put it the right way round.
20140101
20140127
20140303
20140310
20140310
20140310
20140310
20140418
20140419
Any help is very appreciated!