Toon posts:

VB scripting?

Pagina: 1
Acties:

Verwijderd

Topicstarter
Sub Knop_Click
If txtCombobox4=Nederland Then
msgbox "it's right",0,"good"
Else
msgbox "it's wrong",0,"no good"
End if
End Sub

Hiermee wil ik als ik op een knop druk checken of in het treklijstje de goeie tekst staat, echter op deze manier ziet ie het altijd als goed (ook als er iets anders in de combobox staat, en als er haakjes op staan dan rekent ie het altijd fout, ook als er de goeie waarde in staat).
Iemand enig idee wat ik hier fout doe???

  • RobzQ
  • Registratie: Februari 2000
  • Laatst online: 21-12-2020

RobzQ

greedy as a pig

Is het niet txtCombobox4.text = ...

..so be wary of any man who keeps a pig farm..


  • Gerco
  • Registratie: Mei 2000
  • Laatst online: 21-09 21:55

Gerco

Professional Newbie

of:
code:
1
MsgBox Combo1.List(Combo1.ListIndex)

Als je wilt afdwingen dat er iets geselecteerd is.

- "Als ik zou willen dat je het begreep, legde ik het wel beter uit!" | All number systems are base 10!


  • raptorix
  • Registratie: Februari 2000
  • Laatst online: 17-02-2022
Nederland niet tussen quotes?

Verwijderd

Volgens mij gewoon zo:

txtCombobox4.value = "Nederland"