Code:
Dim fso As Object
Dim dir As Object
Dim file As Object
Dim rangews As Worksheet
Dim fPath As String
fPath = "censored"
Set rangews = ThisWorkbook.Worksheets("Sheet1")
Set fso = CreateObject("Scripting.FileSystemObject")
Set dir = fso.GetExtensionName(fPath)
line set dir =.... gives me error 424 object required.
I tried also
Code:
Set fso = CreateObject("Scripting.FileSystemObject").GetExtensionName(fPath)
im using this in excel 2013. is this because im using Windows scripting mechanism inside excel ?
Thanks for help