Para Teman BeExcel,

Tolong saya cari di mana error nya. File dilampirkan

Terima kasih
-Mansor

Private Sub CommandButton1_Click()

Dim rng As Range, cell As Range, selectedRng As Range

Dim askForCell As String, askTitle As String

 askForCell = "Select your range"

askTitle = "Get cell"

 Set selectedRng = Application.InputBox(Prompt:=askForCell,
Title:=askTitle, Type:=8)

Set rng = Range(selectedRng)

For Each cell In rng

If cell.Value >= 50 Then

cell.Font.ColorIndex = 5

Else

cell.Font.ColorIndex = 3

End If

Next cell

End Sub

Attachment: Inputbox.xlsm
Description: Binary data

Kirim email ke