Bonjour,
lorsque l'on ouvre excel,
sur la barre Tout en haut il y a ecrit Microsoft excel - classeur1.xls
peut-on par vba modifier cette affichage...? et donc le personnaliser, et même retirer ou changer l'icone ..?
merci
julien
Version imprimable
Bonjour,
lorsque l'on ouvre excel,
sur la barre Tout en haut il y a ecrit Microsoft excel - classeur1.xls
peut-on par vba modifier cette affichage...? et donc le personnaliser, et même retirer ou changer l'icone ..?
merci
julien
Bonjour;
Jusqu'à Excel2003, tu peux utiliser :
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 Option Explicit Declare Function GetActiveWindow Lib "user32" () As Integer Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Declare Function ExtractIcon Lib "SHELL32.DLL" Alias "ExtractIconA" (ByVal hInst As Long, _ ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" _ (ByVal hwnd As Long, ByVal lpString As String) As Long Declare Function FindWindow& Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) Sub Modif_Icone() Dim lgIcon As Long Dim Wd As Long lgIcon = ExtractIcon(0, "FreeCell.exe", 0) Wd = GetActiveWindow() SendMessage Wd, &H80, 1, lgIcon End Sub Sub Init_Icone() Dim lgIcon As Long Dim Wd As Long Wd = GetActiveWindow() lgIcon = ExtractIcon(0, "Excel.exe", 0) SendMessage Wd, &H80, 1, lgIcon End Sub Sub Modif_TitleBar_Appli() Dim Wd As Long Wd = FindWindow("XLMAIN", Application.Caption) If Wd <> 0 Then SetWindowText Wd, "Nouveau Titre" End Sub
ça ne fonctionne pas sous Excel 2007. Je n'ai pas testé sous Excel2010.
bonne journée
michel