LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Automation: Adding Text to Cell With Different Colours

I'm using VbScript to automate Excel.
The only way I know to programmatically add text with different colours to a
cell is using the 'Characters' function on an existing text:

oExcel.Cells(1, 1) = "This is a Text"
oExcel.Cells(1, 1).Characters(6, 2).Font.ColorIndex = 5
This colors "is" in blue

What I want is a function or a way that colors directly when putting the
text in the cell:
oExcel.Cells(1, 1) = "This "
... then the function that makes text blue
oExcel.Cells(1, 1) = oExcel.Cells(1, 1) & "is "
.... then the function that makes text black
oExcel.Cells(1, 1) = oExcel.Cells(1, 1) & "a Text"

Does anybody know such a function or way?

Manfred


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple text colours in a single cell Ron Excel Discussion (Misc queries) 1 December 18th 08 12:57 AM
Don't change cell colours when adding or deleting rows? Martin ©¿©¬ @nohere.net Excel Discussion (Misc queries) 1 April 16th 07 03:32 PM
different text colours in the same cell in excel Nipun Excel Worksheet Functions 8 January 28th 07 05:21 PM
Adding cells by colours whatzzup Excel Discussion (Misc queries) 1 August 17th 05 01:02 PM
Excel 2003 font colours and cell colours bretta Excel Discussion (Misc queries) 1 April 17th 05 03:45 AM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"