Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre
?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre
?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre
?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Il faut préciser que c'est à partir d'excel 2002 .
j-p
Il faut préciser que c'est à partir d'excel 2002 .
j-p
Il faut préciser que c'est à partir d'excel 2002 .
j-p
Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" a écrit dans le message de
news:41c0a2f7$0$11654$Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" <vincent.laigle@freenospam.fr> a écrit dans le message de
news:41c0a2f7$0$11654$636a15ce@news.free.fr...
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" a écrit dans le message de
news:41c0a2f7$0$11654$Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== > '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As Long)
As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges As
Long,
_
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== > '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== > CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal, "Tab
Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" a écrit dans le message de
news:41c0a2f7$0$11654$Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== > '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As Long)
As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges As
Long,
_
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== > '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== > CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal, "Tab
Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:
Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" <vincent.laigle@freenospam.fr> a écrit dans le message de
news:41c0a2f7$0$11654$636a15ce@news.free.fr...
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== > '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As Long)
As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges As
Long,
_
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== > '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== > CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal, "Tab
Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" a écrit dans le message de
news:41c0a2f7$0$11654$Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou autre ?
Je n'ai rien trouvé dans l'aide, ni dans les forums et sites ...
Merci de votre réponse
Bonsoir
Bon, je vais essayer d'adapter ça. Comme je n'ai pas excel 2002,
c'est la seule alternative
Merci a tous pour vos infos
"GD" a écrit dans le message de news:
eYxp#Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== >> '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As
Long) As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges
As Long, _
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== >> '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== >> CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal,
"Tab Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" a écrit dans le message de
news:41c0a2f7$0$11654$Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou
autre ? Je n'ai rien trouvé dans l'aide, ni dans les forums et
sites ...
Merci de votre réponse
Bonsoir
Bon, je vais essayer d'adapter ça. Comme je n'ai pas excel 2002,
c'est la seule alternative
Merci a tous pour vos infos
"GD" <nomail@nomail.net> a écrit dans le message de news:
eYxp#ev4EHA.2600@TK2MSFTNGP09.phx.gbl...
Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== >> '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As
Long) As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges
As Long, _
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== >> '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== >> CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal,
"Tab Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:
Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" <vincent.laigle@freenospam.fr> a écrit dans le message de
news:41c0a2f7$0$11654$636a15ce@news.free.fr...
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou
autre ? Je n'ai rien trouvé dans l'aide, ni dans les forums et
sites ...
Merci de votre réponse
Bonsoir
Bon, je vais essayer d'adapter ça. Comme je n'ai pas excel 2002,
c'est la seule alternative
Merci a tous pour vos infos
"GD" a écrit dans le message de news:
eYxp#Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== >> '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As
Long) As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges
As Long, _
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== >> '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== >> CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal,
"Tab Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" a écrit dans le message de
news:41c0a2f7$0$11654$Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou
autre ? Je n'ai rien trouvé dans l'aide, ni dans les forums et
sites ...
Merci de votre réponse
Bonsour® Vince ,
Hélas et malgré la souriette destinée à Clément..
je doute fort que tu ne puisses parvenir à tes fins...
Bien que ce code soit l'oeuvre d'un guru EXCEL et comme précisé dans le
code
ainsi que sur le Site ,
"Tab Colour Hack "
ce n'est q'une illusion...
en dehors de EXCEL 2002 et +
la mise en couleur des onglets est impossible de façon réellement
utilisable....
Désolé de t'avoir fait naïvement espérer une solution :-((
@+
wrote:Bonsoir
Bon, je vais essayer d'adapter ça. Comme je n'ai pas excel 2002,
c'est la seule alternative
Merci a tous pour vos infos
"GD" a écrit dans le message de news:
eYxp#Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== > >> '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As
Long) As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges
As Long, _
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== > >> '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== > >> CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal,
"Tab Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" a écrit dans le message de
news:41c0a2f7$0$11654$Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou
autre ? Je n'ai rien trouvé dans l'aide, ni dans les forums et
sites ...
Merci de votre réponse
Bonsour® Vince ,
Hélas et malgré la souriette destinée à Clément..
je doute fort que tu ne puisses parvenir à tes fins...
Bien que ce code soit l'oeuvre d'un guru EXCEL et comme précisé dans le
code
ainsi que sur le Site ,
"Tab Colour Hack "
ce n'est q'une illusion...
en dehors de EXCEL 2002 et +
la mise en couleur des onglets est impossible de façon réellement
utilisable....
Désolé de t'avoir fait naïvement espérer une solution :-((
@+
wrote:
Bonsoir
Bon, je vais essayer d'adapter ça. Comme je n'ai pas excel 2002,
c'est la seule alternative
Merci a tous pour vos infos
"GD" <nomail@nomail.net> a écrit dans le message de news:
eYxp#ev4EHA.2600@TK2MSFTNGP09.phx.gbl...
Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== > >> '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As
Long) As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges
As Long, _
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== > >> '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== > >> CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal,
"Tab Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:
Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" <vincent.laigle@freenospam.fr> a écrit dans le message de
news:41c0a2f7$0$11654$636a15ce@news.free.fr...
Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou
autre ? Je n'ai rien trouvé dans l'aide, ni dans les forums et
sites ...
Merci de votre réponse
Bonsour® Vince ,
Hélas et malgré la souriette destinée à Clément..
je doute fort que tu ne puisses parvenir à tes fins...
Bien que ce code soit l'oeuvre d'un guru EXCEL et comme précisé dans le
code
ainsi que sur le Site ,
"Tab Colour Hack "
ce n'est q'une illusion...
en dehors de EXCEL 2002 et +
la mise en couleur des onglets est impossible de façon réellement
utilisable....
Désolé de t'avoir fait naïvement espérer une solution :-((
@+
wrote:Bonsoir
Bon, je vais essayer d'adapter ça. Comme je n'ai pas excel 2002,
c'est la seule alternative
Merci a tous pour vos infos
"GD" a écrit dans le message de news:
eYxp#Bonsour® Clément
;o))))
rien à faire ???? c'est vite dit !!!
Ivan F Moala ( MVP , CellMaster) a toutefois émis :
So if someone says it can't be done, show them this :-)
'Changing the colour of the Tab
'==================== > >> '// Routine goes in the ThisWorkBook Object
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ChangeTab_Colour
End Sub
'// Routine goes into a Standard Module
Option Explicit
'// Routine to change the colour of the Spreadsheet Tabs
'// API's for System Colours
Private Declare Function GetSysColor Lib "user32" ( ByVal nIndex As
Long) As Long
Private Declare Function SetSysColors Lib "user32" ( ByVal nChanges
As Long, _
lpSysColor As Long, _
lpColorValues As Long) As Long
'// Define Colour Constant
Private Const COLOR_WINDOW = 5
Sub ChangeTab_Colour()
Dim Kolor As Long
Dim CurKolor As Long
Dim R As Integer, G As Integer, B As Integer
'// Initialize random-number generator.
Randomize
'// Generate random value between 0 and 255.
R = Int(255 * Rnd)
G = Int(255 * Rnd)
B = Int(255 * Rnd)
'// Try these if you want Basic Colours
'// ============================================== > >> '// Black 0 0 0 || Blue 0 0 255
'// Green 0 255 0 || Cyan 0 255 255
'// Red 255 0 0 || Magenta 255 0 255
'// Yellow 255 255 0 || White 255 255 255
'// ============================================== > >> CurKolor = GetSysColor(COLOR_WINDOW)
With Application
.ScreenUpdating = False
'// color it Randomly
Kolor = SetSysColors(1, COLOR_WINDOW, RGB(R, G, B))
ShSet
.ScreenUpdating = True
MsgBox "Tab colour has changed!", vbInformation + vbSystemModal,
"Tab Colour Hack "
.ScreenUpdating = False
ShReset
'// Restore to Default
Kolor = SetSysColors(1, COLOR_WINDOW, CurKolor)
.ScreenUpdating = True
End With
End Sub
Sub ShSet()
Dim x As Double
Cells.Select
With Selection
.Interior.ColorIndex = 2
.Interior.Pattern = xlSolid
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For x = 7 To 12
With Selection.Borders(x)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
Next
[A1].Select
End Sub
Sub ShReset()
Cells.Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
[A1].Select
End Sub
http://www.xcelfiles.com/Excel01_02.html
même si ce code est un "hack" ;o)))
le site regorge d'astuces hautement dignes d'utilisation.
;o)))
@+
Clément Marcotte wrote:Bonjour,
Il n'y a rien à faire pour toutes les versions avant Excel 2002.
"vince" a écrit dans le message de
news:41c0a2f7$0$11654$Bonjour a tous,
y a t-il moyen de modifier la couleur d'un onglet, par VBA ou
autre ? Je n'ai rien trouvé dans l'aide, ni dans les forums et
sites ...
Merci de votre réponse