Excel VBA snippets
Application.ThisWorkbook Property (Excel)
Do While i < 6
Cells(i, 1).Value = 20
i = i + 1
Loop
Dim answer As Integer
answer = MsgBox("Are you sure?", vbYesNo + vbQuestion, "Empty sheet")
If answer = vbYes Then
Cells.ClearContents
Else
'do nothing
End If
http://gregmaxey.com/word_tip_pages/populate_userform_listbox_or_combobox.html
For i = 0 to 5
Next i
Select Case score
Case Is >= 80
result = "very good"
Case Is >= 70
result = "good"
Case Is >= 60
result = "sufficient"
Case Else
result = "insufficient"
End Select