ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Search code (https://www.excelbanter.com/excel-programming/287374-search-code.html)

Bourbon[_7_]

Search code
 
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(msoTextOrientationHo rizontal, 242.25,
52.5, _
54#, 23.25).Select
Selection.Characters.Text = ""

End If
End Sub

Thanks again,
B


---
Message posted from http://www.ExcelForum.com/


Cliff Myers

Search code
 
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.TextB ox.1").Select

End If
Next cell
Good luck.

"Bourbon " wrote in message
...
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(msoTextOrientationHo rizontal, 242.25,
52.5, _
54#, 23.25).Select
Selection.Characters.Text = ""

End If
End Sub

Thanks again,
B


---
Message posted from http://www.ExcelForum.com/




Dave Peterson[_3_]

Search code
 
See one reply to your other post.


"Bourbon <" wrote:

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(msoTextOrientationHo rizontal, 242.25,
52.5, _
54#, 23.25).Select
Selection.Characters.Text = ""

End If
End Sub

Thanks again,
B

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson



All times are GMT +1. The time now is 02:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com