473,626 Members | 3,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

manipulating the backcolor of a cell in excel from vb6.0

14 New Member
hey guys I'm trying to change the backcolor of a cell in excel using vb6.0 . at first I changed the size like this

obj1.Columns(3) .ColumnWidth = 15

but now I need to change the color thanks a lot!
Jun 29 '07 #1
1 6483
kadghar
1,295 Recognized Expert Top Contributor
hey guys I'm trying to change the backcolor of a cell in excel using vb6.0 . at first I changed the size like this

obj1.Columns(3) .ColumnWidth = 15

but now I need to change the color thanks a lot!
use .Interior.Color or .ColorIndex

obj1.Columns(3) .Interior.Color = RGB(10, 100, 100)
obj1.Columns(3) .Interior.Color Index = 10

in the first one you have your palette, in the second one you'll use excel's default colors, i dont have the list, but i think you can google it.
Jun 29 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
6659
by: Tom Rowton | last post by:
This one has me a bit confused and I'm not finding what I need in the MSDN or by searching these forums, so here goes... I have a rather large, complex code-in-page WebForm (don't ask) and a section of that Form is 4 or 5 ASP:Panels pretending to be a set of Tabs, each with its own section of the form.
6
1651
by: Jim | last post by:
I have a Web application that needs to update a Microsoft Excel spreadsheet for complex calculations, whereby I read the results into a dataset for display. I am accessing my spreadsheet using OLE DB and ADO. I'm trying to use and SQL update statement to update a cell in my spreadsheet, but I keep receiving the error: No value given for one or more required parameters. From this SQL statement: UPDATE BallisticInfo SET =3200 WHERE = 1 ...
18
8278
by: Frank M. Walter | last post by:
Hello, I have made an small AddIn with udf for excel 2003. I use vs2003. The point of view is the function __T() I call it in excel sheet writing =__T() I am not able to set a value to a given cell. region.Value2="qwe"; //bumm! A exception will be trown. On all PCs with excel. HRESULT 0x800A03EC
6
24540
by: McKirahan | last post by:
I an using ASP to read a database table and generate an HTML table which is save via FSO with a file extension of .xls which opens up in MS-Excel. I am inserting several lines of text into a cell and would like to force a line break between them. I recorded an MS-Excel macro so see how Alt-Enter was captured which turned out to be Chr(10) which is the same as vbLf (right?) I tried inserting that in character in the text but it didn't...
16
2688
by: alexia.bee | last post by:
Hi all, In some weird reason, excel instance won;t die if i remove the comment from 4 lines of setting values into struct. here is a snipcode public System.Collections.Generic.List<frmMain.sDBTest> LoadTestSet(string TestSetFile, System.Collections.Generic.List<frmMain.sDBTestDBviewList)
2
2887
by: Brian Parker | last post by:
I need to format text in cell in an Excel worksheet and I need to do this using C#. I've seen code that will set the format for the whole cell, but I just need to format one character in that cell. Example: The cell has this text in it: H20 I need to use C# to change the "2" to be a subscript.
4
5732
by: spirit | last post by:
Hi, I have C++ code to write data to a .csv file thereby resulting in an excel spreadsheet. I was just wondering whether it wud be possible for us to further manipulate the csv file like for example filling a cell with a particular color etc...with C++ code? Thanks fr your suggestions and help,
2
9709
by: patrick.waldo | last post by:
Hi all, I am trying to figure out a way to read colors with xlrd, but I did not understand the formatting.py module. Basically, I want to sort rows that are red or green. My initial attempt discovered that text:u'test1.txt' (XF:22) text:u'test2.txt' (XF:15) text:u'test3.txt' (XF:15) text:u'test4.txt' (XF:15) text:u'test5.txt' (XF:23)
1
3331
by: nirmala26 | last post by:
Hi All, I am using C#.net to develop a web application. I have a gridview and a table displaying two different lists of data. I want to have the backcolor of the cell (of both gridview and table) to blink between two colors, say for example the cell background color must blink (two colors using yellow, green). Is this possible ? I am able to only set the backcolor property with just one value. Can anyone help me with some ideas on how...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2630
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.