aribfaishal
New Member
- Joined
- Jan 26, 2015
- Messages
- 3
anyone can help me to solve this code? it always stuck "Else Without If".
for my homework
this is the code (some code like MsgBox using indonesian language because i'm from indonesia :D ):
Private Sub CmbInput_Click()
Set info = Worksheets(CekHarga)
If info.Range("C3").Value = "" Then pesan = MsgBox("PERHATIAN!!!" & vbCrLf & "Kolom nama/kode barang masih kosong!", vbOKOnly + vbCritical, "INPUT GAGAL")
Call Range("C3").Select
Else info.Range("C3").Value <> "" Then pesan = MsgBox("Masukkan data sekarang?", vbYesNo + vbInformation, "Informasi Data")
If pesan = vbYes Then
Set dbs = Worksheets("Dafter Pesanan")
linenext = dbs.Cells(Rows.Count, “A”).End(xlUp).Offset(2, 0).Row
dbs.Cells(linenext, 1).Value = Range("C3").Value
End If
End Sub
The code Stuck at :
Else info.Range("C3").Value <> "" Then pesan = MsgBox("Masukkan data sekarang?", vbYesNo + vbInformation, "Informasi Data")
for everybody, thanks before
for my homework
this is the code (some code like MsgBox using indonesian language because i'm from indonesia :D ):
Private Sub CmbInput_Click()
Set info = Worksheets(CekHarga)
If info.Range("C3").Value = "" Then pesan = MsgBox("PERHATIAN!!!" & vbCrLf & "Kolom nama/kode barang masih kosong!", vbOKOnly + vbCritical, "INPUT GAGAL")
Call Range("C3").Select
Else info.Range("C3").Value <> "" Then pesan = MsgBox("Masukkan data sekarang?", vbYesNo + vbInformation, "Informasi Data")
If pesan = vbYes Then
Set dbs = Worksheets("Dafter Pesanan")
linenext = dbs.Cells(Rows.Count, “A”).End(xlUp).Offset(2, 0).Row
dbs.Cells(linenext, 1).Value = Range("C3").Value
End If
End Sub
The code Stuck at :
Else info.Range("C3").Value <> "" Then pesan = MsgBox("Masukkan data sekarang?", vbYesNo + vbInformation, "Informasi Data")
for everybody, thanks before
Last edited: