Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-11-2012, 09:43 AM
gvdm gvdm is offline Append text to a cell with color Windows 7 32bit Append text to a cell with color Office 2010 32bit
Novice
Append text to a cell with color
 
Join Date: Apr 2012
Posts: 2
gvdm is on a distinguished road
Default Append text to a cell with color

Hello!



I need to append to a the text of a cell (in which some of the characters are red and the others are black) the characters "hi" coloured in red.

I've tried with this code

Code:
Dim strOut As String
Dim charOut As Characters
strOut = Sheet1.Range("G8").Characters.Text
strOut = strOut + " hi"
Sheet1.Range("G8").Characters.Text = strOut 'THIS IS THE WRONG LINE

Set charOut = Sheet1.Range("G8").Characters(Sheet1.Range("G8").Characters.Count - 1, 2) 'pick the last two chars to be coloured

charOut.Font.Color = RGB(255, 0, 0)
The problem is that, when I update the cell's string with the new string, it changes the format of the cell overwriting the previous formatting..

Is there a way to append a text to a cell with it's own colour without changing the format of the rest of the cell?

Thanks in previous
Giulio
Reply With Quote
  #2  
Old 04-17-2012, 10:21 AM
gvdm gvdm is offline Append text to a cell with color Windows 7 32bit Append text to a cell with color Office 2010 32bit
Novice
Append text to a cell with color
 
Join Date: Apr 2012
Posts: 2
gvdm is on a distinguished road
Default

none of you can help me?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I fill cell color starting from Cell D5 using Conditional formatting instead Learner7 Excel 0 07-08-2010 05:50 AM
How can I make a cell color RED under the Today's date cell? Learner7 Excel 2 07-08-2010 12:52 AM
Append text to a cell with color Filtering on cell color mattc Excel 1 04-30-2010 09:27 AM
Append text to a cell with color Extracting Cell color bsaucer Excel 1 06-19-2009 06:52 AM
Auto-populate an MS Word table cell with text from a diff cell? dreamrthts Word Tables 0 03-20-2009 01:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft