AnsweredAssumed Answered

vrf xlLib Globals

Question asked by VRFuser on Aug 27, 2007
The following Excel Visual Basic for Application script will change the background colour of cells in the B column and put the ColorIndex Number in the A column beside the appropriate cell.  This uses the default or customized palette.

 

Sub CellBackgroundColour()

 

Dim stringOne As String

Dim stringTwo As String

Dim I As Integer

 

Sheets(1).Select

 

For i = 0 To 56

 

stringOne = "A" & (i + 1)

stringTwo = "B" & (i + 1)

Range(stringOne) = i

Range(stringTwo).Interior.ColorIndex = i

 

Next i

 

 

End Sub

 

Alternatively the other command for background colour is

 

Range(“A1”).Interior.Color = RGB(r, g, b)

 

Where:

r = 0 to 255
g = 0 to 255
b = 0 to 255

 

To use in VEE a formula box containing xlApp.Range(“A1”).Interior.Color = RGB(r, g, b) should do the trick

 

Cheers,

Gary

Gary Voltz
SASTO4

Test Equipment and Maintenance and Calibration Centre

Facilities Management Services

Technology and Asset Services

Airservices Australia


E-mail: gary.voltz@airservicesaustralia.com

  _____  

Airservices Australia
Ph 1300 301 120       (within Australia)
Ph +61 7 3866 3382  (outside Australia) 
Fax +61 7 3866 3531
HYPERLINK "http://www.airservicesaustralia.com/"www.airservicesaustralia.com

CAUTION: This e-mail is confidential. If you are not the intended
recipient, you must not disclose or use the information contained
in it. If you have received this e-mail in error, please tell us
immediately by return e-mail and delete the document.

Airservices Australia does not represent, warrant or guarantee
that the integrity of this communication is free of errors, virus
or interference.

 

  _____  

From: Baranski, Detlef [mailto:Detlef.Baranski@pilkington.de]
Sent: Tuesday, 28 August 2007 12:06 AM
To: VRF
Subject: AW: [vrf] xlLib Globals

 

You may use any activeX command you want. you just have to know that the xlLib object has to start with xlapp.something.

Best way to find out the specific command is to record a macro and watch for the code...

 

detlef

 

  _____  

Von: William.Drago@L-3com.com [mailto:William.Drago@L-3com.com]
Gesendet: Montag, 27. August 2007 15:50
An: VRF
Betreff: [vrf] xlLib Globals

All,

 

Does anyone know how to access spreadsheets opened by VEE's built-in excel library? xlLib does 99% of what I need, but for that other 1% I need to write some custom functions.

 

For example, I'd like to change the background color of a cell. xlLib does have a formatting function, but it doesn't let you change background color without adding a border.

 

Thanks,

Bill


---
You are currently subscribed to vrf as: Detlef.Baranski@pilkington.de
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
Der Inhalt dieser E-Mail (inkl. aller Anlagen) ist vertraulich und ausschlie_lich f|r den Adressaten bestimmt. Jede Art der Verbreitung, Nutzung oder Vervielfdltigung ist untersagt. Sollten Sie diese E-Mail irrt|mlich erhalten haben, informieren Sie bitte sofort den Absender und lvschen die E-Mail.

Unternehmensangaben der Gesellschaften mit Sitz in Deutschland:

Pilkington Holding GmbH, Haydnstra_e 19, 45884 Gelsenkirchen
Sitz: Gelsenkirchen, Amtsgericht Gelsenkirchen HRB 8997
Geschdftsf|hrung: Jochen Settelmayer (Vorsitz), Dr. Clemens Miller, Thomas Kretschmann, Robert Hales
Vorsitzender des Aufsichtsrates: Dr. Axel Wiesener

Pilkington Deutschland AG, Haydnstra_e 19, 45884 Gelsenkirchen
Sitz: Gelsenkirchen, Amtsgericht Gelsenkirchen HRB 2707
Vorstand: Dr. Clemens Miller, Jochen Settelmayer
Vorsitzender des Aufsichtsrates: Dr. Axel Wiesener

Pilkington Automotive Deutschland GmbH, Otto-Seeling-Stra_e 7, 58455 Witten
Sitz: Witten, Amtsgericht Bochum HRB 8443
Geschdftsf|hrung: Thomas Kretschmann
Vorsitzender des Aufsichtsrates: Jochen Settelmayer

Bauglasindustrie GmbH, H|ttenstra_e 33, 66839 Schmelz / Saar
Sitz: Schmelz / Saar, Amtsgericht Saarbr|cken HRB 52020
Geschdftsf|hrung: Manfred Ebbers


---
You are currently subscribed to vrf as: gary.voltz@airservicesaustralia.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".


---
You are currently subscribed to vrf as: hua_jing@agilent.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".  

Outcomes