-
Edit & changing colors in specific cell in excel
Hi
I'm writing a project in VB.NET using Excel.
I want to know how can I insert string to specific cell, how can I change the color of specific cell, and how can i fill sheet (making loops that run through all the columns and rows that I'm telling it too).
Thanks
-
The following should get you started:
How to automate Microsoft Excel from Visual Basic .NET
In addition, the macro recorder in Excel is a good tool for generating code and learning the object model.
Paul
~~~~
Microsoft MVP (Visual Basic)
-
changing colors in excl from vb.net
Hi
I'm trying to change the color of Excel's cell by
exWS.Range("B2", "F2").Font.Color.System.Drawing.Color.Red()
but it gives me an error
what's the correct way to do this?
-
Not sure if you're trying to change the Font color or Cell Interior, but I'm assuming the latter:
.Range("B2", "F2").Interior.ColorIndex = 3
Paul
~~~~
Microsoft MVP (Visual Basic)
-
Excel 2003 Row Specific Cell Font Color Setting
 Originally Posted by biot
Hi
I'm trying to change the color of Excel's cell by
exWS.Range("B2", "F2").Font.Color.System.Drawing.Color.Red()
but it gives me an error
what's the correct way to do this?
--------------------------------------------------------------------
Hi Friend, 
I did encounter the same problem 3 hours ago and I tried out this coding and surprsing it works. I am using VBNEt2008 and EXCEL 2003
this is the coding that I tried and it works:
xlWrkSheet.Cells(intRow, icol).Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Blue)
Hope you try it
Cheers,
Lennie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|