How to use "is nothing" ? (synthax)

  • Thread starter Thread starter t f
  • Start date Start date
T

t f

Hello,


Have you some code to translate this in vba ?
---------------------------------------------

if the folder "myfolder" exists then
delete this folder "myfolder" (and all items inside)
else
create this folder "myfolder" (prepare it to store items)
end if


Have you the exact synthax because it fails on my computer
with actual code ?

I have tried with the keyword "Is Nothing" but with no success.




Thank you
Tony
 
If myObject Is Nothing Then
' don't try to use any properties or methods from myObject
Else
' it's OK to use myObject properties and methods
End If
 
Back
Top