Results 1 to 2 of 2

Thread: Invert VBA code

  1. #1
    Join Date
    Jul 2016
    Posts
    14
    Provided Answers: 1

    Answered: Invert VBA code

    hello guys

    i have this code that checking file path exists

    PHP Code:
     If Dir(File) <> "" Then
        
    ' File exists
        ' 
    Do something
    Else

        
    ' File does not exists
        ' 
    Do Something else
    End If 
    i just want to invert it to be

    PHP Code:
    If ####### Then
       
    ' File does not exists
    else
        ' 
    File exists
    end 
    if 
    anyone help me giving me this code inverted that way ?!!

  2. Best Answer
    Posted by alvingenius

    "Got it guys

    PHP Code:
    If Dir(File) <> "" False Then
        
    ' File does not exists
    Else
        ' 
    File  exists

    End 
    If 
    Thanks ,"


  3. #2
    Join Date
    Jul 2016
    Posts
    14
    Provided Answers: 1
    Got it guys

    PHP Code:
    If Dir(File) <> "" False Then
        
    ' File does not exists
    Else
        ' 
    File  exists

    End 
    If 
    Thanks ,

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •