Public Function fileExist(ByVal nFileName As String) As Boolean
Dim dummy As Long
fileExist = True
On Error GoTo Hell
dummy = FileLen(nFileName)
Exit Function
Hell:
fileExist = False
End Function
Private Sub Command1_Click()
If fileExist("C:\Contoh.txt")=true then
msgbox "File Sudah Ada!!"
Else
msgbox "File Belum Ada!!"
End If
End Sub
Regards,
LiveDeviL
On 9/19/05, henri suranto <[EMAIL PROTECTED]> wrote:
Contoh :
If Dir ("c:\tes.text") <> "" Then
Msgbox "File Ada"
Else
Msgbox "File Tidak Ada"
End If
--- ChipMunks <[EMAIL PROTECTED]> wrote:
> Hello Programmer-VB,
>
> Kalo ingin tahu apakah sebuah nama file itu sudah
> ada belum bagaimana
> caranya ya... ?
>
> Best regards,
> ChipMunks
> mailto : [EMAIL PROTECTED]
> Telp : 021-57904488 ext 1707
> Yahoo : Henqy
>
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
Untuk keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]
SPONSORED LINKS
Programmer Indonesia Basic programming language Computer programming languages Programming languages Java programming language
YAHOO! GROUPS LINKS
- Visit your group "Programmer-VB" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Untuk keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]
YAHOO! GROUPS LINKS
- Visit your group "Programmer-VB" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
