[ VB6 ] Directory.exists probleem.

Pagina: 1
Acties:
  • 51 views sinds 30-01-2008

  • Addict
  • Registratie: Augustus 2003
  • Laatst online: 22-03 14:35

Addict

Het leven is een plak kaas.

Topicstarter
Ben bezig met een stukje software, maar ik stuit op hetvolgende probleem:

Ik wil als een dir niet gevonden wordt, een msngbox hebben met de error (kan dir niet vinden)

code:
1
2
3
Dir.Exists("D:\01. -= Program Files =-\Mozilla Firefox\firefox.exe") = False Then
msgbox Error "The directory doesn't exist", vbOKonly
'Command fixen, expect end of statement bij then.


Deze error krijg ik:
---------------------------
Microsoft Visual Basic
---------------------------
Compile error:

Expected: end of statement

Wie heeft er een fix voor mij ?, uiteraard heb ik al gebruik gemaakt van zoekmachines.

Addict


Verwijderd

Volgens mij mist er een "if"?

  • NMe
  • Registratie: Februari 2004
  • Laatst online: 11-03 14:33

NMe

Quia Ego Sic Dico.

Waar is de bijbehorende if? :?

edit:
Spuit 11. :P

[ Voor 30% gewijzigd door NMe op 23-02-2006 19:46 ]

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.


  • UniCache2
  • Registratie: Januari 2001
  • Laatst online: 02-03 09:30
code:
1
2
3
4
If Dir.Exists("D:\01. -= Program Files =-\Mozilla Firefox\firefox.exe") = False Then
   msgbox("Error: 'The directory doesn't exist'", vbOKonly)
   'Command fixen, expect end of statement bij then. 
End If


Zoiets?

[ Voor 27% gewijzigd door UniCache2 op 23-02-2006 19:48 . Reden: Die IF had ik nog niet eens gezien B) ]


  • Jimbolino
  • Registratie: Januari 2001
  • Laatst online: 08-04 13:31

Jimbolino

troep.com

hehe, goed dat ik ff op refresh drukte alvorens te posten, anders was ik nr3 ;P

The two basic principles of Windows system administration:
For minor problems, reboot
For major problems, reinstall


  • RaZ
  • Registratie: November 2000
  • Niet online

RaZ

Funky Cold Medina

Waarom kijken of de dir bestaat, als je op een bestand kijkt?
De dir kan er prima zijn, maar die exe hoeft er niet te staan natuurlijk

Ey!! Macarena \o/


  • Addict
  • Registratie: Augustus 2003
  • Laatst online: 22-03 14:35

Addict

Het leven is een plak kaas.

Topicstarter
Ok, bedankt :)

Fixed,
lompe actie idd

Addict


  • NMe
  • Registratie: Februari 2004
  • Laatst online: 11-03 14:33

NMe

Quia Ego Sic Dico.

Goed, simpel debugklusje dus. :)

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.

Pagina: 1

Dit topic is gesloten.