🔒 Closed Help! error

Status
Not open for further replies.

ElectronicKong

Honorary Poster
Private Sub Combo1_Click()
If Combo1.Text = "apple" Then
Combo2.AddItem = "red"
Combo2.AddItem = "green"

ElseIf Combo1.Text = "banana" Then
Combo2.Clear
Combo2.AddItem = "saba"
Combo2.AddItem = "yellow"
End If


End Sub



eto yung error nya

compile error:
argument not optional



pano po ito salamat :)
 
I think dahil sa "=" ng combo box AddItem?
"Argument not optional" <-- meaning required ang argument sa specific control mo
so I suspect na syntax error ung Combo2.AddItem = "red"

try removing the "=", e.g:
Combo2.AddItem "red"

-- sorry, matagal nako di gumagamit ng vb so hindi ako sure about this :)
 
Status
Not open for further replies.

About this Thread

  • 4
    Replies
  • 1K
    Views
  • 3
    Participants
Last reply from:
ElectronicKong

Online now

Members online
353
Guests online
1,020
Total visitors
1,373

Forum statistics

Threads
2,275,082
Posts
28,960,548
Members
1,233,583
Latest member
Natsuuuu77
Back
Top