Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default visual basic

bonjour à tous,
est-ce que quelqu'un pourrait m'aider concernant un programme visual
basic.Mon soucis est le suivant:lorsque je rentre une lettre dans une
cellule, cette cellule se colore dans une couleur déterminée suivant la
lettre.jusque là pas de problème.Mon soucis arrive quand ma 2ème cellule
doit-être égale à la 1è la lettre se reporte bien , mais pas la couleur.
Ci dessous le programme que j'utilise
Merci par avance de votre aide

Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
If Not Intersect(Target.Cells, Range("B5", ["AF208"])) Is Nothing Then
For Each c In Target
Select Case c.Value
Case "AM": c.Interior.ColorIndex = 3
Case "AT": c.Interior.ColorIndex = 3
Case "M": c.Interior.ColorIndex = 20
Case "FM": c.Interior.ColorIndex = 20
Case "FMO": c.Interior.ColorIndex = 20
Case "N": c.Interior.ColorIndex = 37
Case "FN": c.Interior.ColorIndex = 37
Case "S": c.Interior.ColorIndex = 38
Case "FS": c.Interior.ColorIndex = 38
Case "FSO": c.Interior.ColorIndex = 38
Case "J": c.Interior.ColorIndex = 19
Case "FJO": c.Interior.ColorIndex = 19
Case "R": c.Interior.ColorIndex = 35
Case "FR": c.Interior.ColorIndex = 35
Case "CP": c.Interior.ColorIndex = 35
Case "F": c.Interior.ColorIndex = 24
Case "EM": c.Interior.ColorIndex = 40
Case "CPA": c.Interior.ColorIndex = 40
Case "MA": c.Interior.ColorIndex = 40
Case "NA": c.Interior.ColorIndex = 40
Case "B": c.Interior.ColorIndex = 40
Case "D": c.Interior.ColorIndex = 40
Case "H": c.Interior.ColorIndex = 40
Case "DE": c.Interior.ColorIndex = 40
Case Else: c.Interior.ColorIndex = xlNone
End Select
Next
End If
End Sub
--


Katia , Fred & Valentin


Reply
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
Visual Basic cil Excel Discussion (Misc queries) 3 January 11th 10 04:27 AM
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Visual Basic Micos3 Excel Discussion (Misc queries) 9 June 28th 05 01:41 PM
Very visual basic Robert Couchman[_5_] Excel Programming 10 March 5th 04 03:24 PM


All times are GMT +1. The time now is 11:48 AM.

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

About Us

"It's about Microsoft Excel"