MrExcel Publishing
Your One Stop for Excel Tips & Solutions

inputbox


Posted by anne on June 19, 2001 5:18 AM

At first sorry my bad bad english :)
Why this does not work? it work when merkkijono = InputBox("Mitä haetaan?") is like merkkijono= cells(1,11) but not when it is like this ->

Private Sub CommandButton2_Click()
Dim merkkijono As String
Dim i, j As Integer
merkkijono = InputBox("Mitä haetaan?")
i = 2

For j = 2 To 99
If merkkijono <> Cells(i, 1) Then
i = i + 1
Else
Taul3.Rows(i).Font.Bold = True
End If
Next j
End Sub


Posted by Barrie Davidson on June 19, 2001 11:06 AM

If I understand your problem correctly, try changing:
If merkkijono <> Cells(i, 1) Then
to:
If merkkijono <> Cells(i, 1).Value Then

Barrie