How come this is not working?

Code:
Dim FSO as FileSystemObject
Dim objFile as file
Dim objFolder as folder

'FolderPath = a valid folder name on drive
Set objFolder = FSO.GetFolder(FolderPath)

For Each objFile In objFolder
 'CODE HERE
next
I get an error on the For Each line saying
object doesn't support property or method

i could have sworn that this was working a day ago though