Search code

  • Thread starter Thread starter Bourbon
  • Start date Start date
B

Bourbon

I want to search all of columm C and if there is an entry in any cell
then create 1 text box besides every entry. I have the following code
but it does not work.

ANy ideas?

If Sheet1!C1.Value = True Then

ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 242.25,
52.5, _
54#, 23.25).Select
Selection.Characters.Text = ""

End If
End Sub

Thanks again,
B
 
Try this, this code put a textbox in the next column beside every cell that
contained the word Plums. Maybe not the prettiest code but it worked.

For Each cell In Range("H9:H16")
If cell.Value = "Plums" Then
cell.Activate
ActiveCell.Offset(0, 1).Activate
ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.1").Select

End If
Next cell
Good luck.
 
See one reply to your other post.


Bourbon < said:
I want to search all of columm C and if there is an entry in any cell
then create 1 text box besides every entry. I have the following code
but it does not work.

ANy ideas?

If Sheet1!C1.Value = True Then

ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 242.25,
52.5, _
54#, 23.25).Select
Selection.Characters.Text = ""

End If
End Sub

Thanks again,
B
 
Back
Top