Hey all,
I'm hoping someone can help.
I'm trying to do something very simple.
Code:
If Len(Dir(WoPath, vbDirectory)) = 0 Then MkDir (WoPath)
But it's failing with Runtime error 13 - Type Mismatch and I have no idea why. There are spaces in the string so I've also tried the following with the same error:
Code:
If Len(Dir(""" & WoPath & """, vbDirectory)) = 0 Then MkDir (WoPath)
Code:
If Len(Dir("'" & WoPath & "'", vbDirectory)) = 0 Then MkDir (WoPath)
The string eventuates to "\\<SERVER NAME>\Biomass_Main$\17. AIT\01 IPS-ACS documents and Photos\01_IPS Plans\01_SM\12877654_PXMZPY EQUIPMENT PANEL THERMAL EQUIP…" which is 147 characters long and the directory does not exist yet.
If anyone has any ideas it would really be appreciated. I've already tried a compact and repair as well.
Cheers
Robyn