Theo
Member
Hi all,
Im trying to use the Dir function to determine wether a certain image excists or not. But the variable strDir is always empty, even when an image does excist. (see code below).
- The parameter pItem is the name of the image without the extension.
- All the images have NO attributes
Im trying to use the Dir function to determine wether a certain image excists or not. But the variable strDir is always empty, even when an image does excist. (see code below).
Code:
Public Function getIMG(ByVal pItem As String) As String
Dim strDir As String
strDir = Dir("Z:\images\" & pItem & ".jpg")
Return strDir
End Function
- The parameter pItem is the name of the image without the extension.
- All the images have NO attributes
Last edited by a moderator: