Hello,

I'm having a problem with overwriting a directory. I have a userform where if the directory doesn't exist I use MKDIR to create the directory but I also want the user to be able to overwrite the directory. Is there anyway to do this? I have the following code:


month = Me.monthcbg.Text
    year = Me.yrcbg.Text
     
    If Len(Dir("L:\NAI_Groups\IS Monthly Operations Meeting\" & month & year, vbDirectory)) = 0 Then
    MkDir "L:\NAI_Groups\IS Monthly Operations Meeting\" & month & year
    End If
    
    If Len(Dir("L:\NAI_Groups\IS Monthly Operations Meeting\" & month & year, vbDirectory)) <> 0 Then
    response = MsgBox("A presentation already exists, do you want to overwrite?", vbYesNo)
        If response = vbYes Then
        Name "L:\NAI_Groups\IS Monthly Operations Meeting\" & month & year As _
        "L:\NAI_Groups\IS Monthly Operations Meeting\" & month & year
        If response = vbNo Then
        MsgBox "Presentation was not created", vbExclamation
        Exit Sub
        End If
    End If
    End If
yrcbg and monthcbg are comboboxes if that even makes a difference

Thanks in advance