I know how to find a string in a comment field, but I can't seem to find a
way to do a Find and Replace inside a comment field. Does anyone know how?
I know how to find a string in a comment field, but I can't seem to find a
way to do a Find and Replace inside a comment field. Does anyone know how?
Try
Dim CMT As Comment
Set CMT = Range("A1").Comment
CMT.Text Text:=Replace(CMT.Text, "test", "another test")
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Richcarvel" <[email protected]> wrote in
message
news:[email protected]...
>I know how to find a string in a comment field, but I can't seem
>to find a
> way to do a Find and Replace inside a comment field. Does
> anyone know how?
Thanks, Chip. Forgive my ignorance of VB. That code replaced one instance
of the text in the spreadsheet, how do I get them all? Thanks. Rich
"Chip Pearson" wrote:
> Try
>
> Dim CMT As Comment
> Set CMT = Range("A1").Comment
> CMT.Text Text:=Replace(CMT.Text, "test", "another test")
>
>
> --
> Cordially,
> Chip Pearson
> Microsoft MVP - Excel
> Pearson Software Consulting, LLC
> www.cpearson.com
>
>
> "Richcarvel" <[email protected]> wrote in
> message
> news:[email protected]...
> >I know how to find a string in a comment field, but I can't seem
> >to find a
> > way to do a Find and Replace inside a comment field. Does
> > anyone know how?
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks