srinu_001241
-
Total Posts
:
16
- Scores: 0
-
Reward points
:
0
- Joined: 11/14/2011
-
Status: offline
|
Hi, this related to execl cells
Tuesday, November 15, 2011 7:58 PM
( permalink)
I have some information like "My name is srinu" in a cell(1,1). Just I want to convert only the colour of "srinu" in the cell to red. how can I do that by using vbscript. Thanks in advance
|
|
|
|
59cobalt
-
Total Posts
:
972
- Scores: 91
-
Reward points
:
0
- Joined: 7/17/2011
-
Status: online
|
Re:Hi, this related to execl cells
Wednesday, November 16, 2011 9:16 AM
( permalink)
Set xl = GetObject(, "Excel.Application")
start = 12
length = 5
xl.ActiveSheet.Cells(1, 1).Characters(start, length).Font.ColorIndex = 3
|
|
|
|
srinu_001241
-
Total Posts
:
16
- Scores: 0
-
Reward points
:
0
- Joined: 11/14/2011
-
Status: offline
|
Re:Hi, this related to execl cells
Wednesday, November 16, 2011 11:50 PM
( permalink)
This is working. Thanks a lot Cobalt.
|
|
|
|
59cobalt
-
Total Posts
:
972
- Scores: 91
-
Reward points
:
0
- Joined: 7/17/2011
-
Status: online
|
Re:Hi, this related to execl cells
Thursday, November 17, 2011 8:35 AM
( permalink)
I'll relate your thanks to Excel's macro recorder.
|
|
|
|
srinu_001241
-
Total Posts
:
16
- Scores: 0
-
Reward points
:
0
- Joined: 11/14/2011
-
Status: offline
|
Re:Hi, this related to execl cells
Thursday, December 22, 2011 4:46 AM
( permalink)
Set xl = GetObject(, "Excel.Application") start = 12 length = 5 xl.ActiveSheet.Cells(1, 1).Characters(start, length).Font.ColorIndex = 3 Hi Cobalt, I am facing problems, if the cell data contails only numeric values. Above statement is working fine if the cell data contains strings/alfa numerics. I tried in converting the cell data to string by using cstr but it didn't work. Could you please help me? Thanks
<message edited by srinu_001241 on Thursday, December 22, 2011 4:48 AM>
|
|
|
|
ebgreen
-
Total Posts
:
8227
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
Re:Hi, this related to execl cells
Thursday, December 22, 2011 4:54 AM
( permalink)
Use the macro recorder in excel.
|
|
|
|
srinu_001241
-
Total Posts
:
16
- Scores: 0
-
Reward points
:
0
- Joined: 11/14/2011
-
Status: offline
|
Re:Hi, this related to execl cells
Thursday, December 22, 2011 5:29 PM
( permalink)
|
|
|
|