Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro - Unable to record

Status
Not open for further replies.

gnb621

Technical User
Jun 5, 2003
7
US
I am encountering the following problem:

I need a certain part of text in a cell to be bolded. When I select the cell and highlight the text to bold it appears to work but once I go to select another cell a window pops up with an "unable to record" message.

Anyone have any ideas on how to overcome this. It seems to be a really big deal in my department to have the text appear in bold.

Example:

PLEASE SHIP 06/02 AND DELIVER 06/06
Thanks.

 
Assuming that "PLEASE SHIP 06/02 AND DELIVER 06/06" was in cell A1 then either of the following two code examples would produce the outcome you want.


Code:
Range("A1").Characters(Start:=13, Length:=5).Font.FontStyle = "Bold"
Range("A1").Characters(Start:=31, Length:=5).Font.FontStyle = "Bold"

or:

Code:
Range("A1").Characters(13, 5).Font.FontStyle = "Bold"
Range("A1").Characters(31, 5).Font.FontStyle = "Bold"
 
Is the worksheet "protected"?

Tools > Worksheet > Unprotect (then enter the password)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top