Check For a File Public Function FileExist(asPath as string) as Boolean If UCase(Dir(asPath))=Ucase(trimPath(asPath)) then FileExist=true Else FileExist=False End If End Function Public Function TrimPath(ByVal asPath as string) as string if Len(asPath)=0 then Exit Function Dim x as integer Do x=Instr(asPath,”\”) if x=0 then Exit Do asPath=Right(asPath,Len(asPath)-x) Loop TrimPath=asPath End Function Private sub command1_Click() if fileExist(Text1.text) then Label1=”YES” else Label1=”NO” End if End Sub Private sub form_Load() End sub Posted by Administrator in 08:58:16 | Permalink | No Comments » Tuesday, July 1, 2008 Low and Upper Case ‘add 2 command buttons and 1 text Private Sub Command1_Click() Text1.Text = CapFirst$(Text1.Text) End Sub Private Sub Command2_Click() Text1.Text = LCase$(Text1.Text) End Sub ‘add 1 module Declare Function CapFirst$ Lib “CAPFIRST.DLL” Alias “CAPFIRST” (ByVal St$) Posted by Administrator in 07:11
Ingin Mengetahui Lebih lanjut..?