Hi
I've got some code which checked the if a file had 8 columns in it, before it allowed you to import data from the file into Excel.
However, the data in that file started on row 1.
I've got a file where the data starts in row 8, and I wanted to amend the code below, so it checks if the file has 28 columns starting from cell A8.
Does anyone know how to do this? TIA
If ActiveSheet.Cells.SpecialCells(xlLastCell).Column <> 28 Then
MsgBox "Check you've selected the right file"
I've got some code which checked the if a file had 8 columns in it, before it allowed you to import data from the file into Excel.
However, the data in that file started on row 1.
I've got a file where the data starts in row 8, and I wanted to amend the code below, so it checks if the file has 28 columns starting from cell A8.
Does anyone know how to do this? TIA
If ActiveSheet.Cells.SpecialCells(xlLastCell).Column <> 28 Then
MsgBox "Check you've selected the right file"