ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Trying to highlight (bold,red) selected text within range (https://www.excelbanter.com/excel-discussion-misc-queries/106273-trying-highlight-bold-red-selected-text-within-range.html)

tmayhall

Trying to highlight (bold,red) selected text within range
 
I'm trying to write VB to allow selecting a phrase and a range and then
highlighting each instance of the phrase with bold and red font. Want to
highlight only the characters contained in the phrase, not the entire cell's
contents. Having trouble using a command similar to FIND in Excel, which
doesn't seem to translate well to VB. Every reference I've found is for
locating a cell, not a character within a cell.

I'm using RefEdit to select the range and a text box to enter the phrase.
Want to create a UserForm that can be added to the normal template.

Any suggestions?


All times are GMT +1. The time now is 01:58 AM.

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