Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

PB power point et excel sous vba

2 réponses
Avatar
Angelus
Bonjour
Je recherche 3 choses en fait (je débute en programmation VB) :-)
1) quel est la commande dans le vba de power point pour minimisé dans la
barre des taches windows un pps après une action. (clic sur un bouton ouvrant
une fenêtre exploreur)
2) sous power point comment empéché l'ouverture d'un racourcie hypertexte
dans le cas où il serai déjà ouvert par une autre personne (fichier sur un
disque commun)
3) sous excel : je voudrai encadré dans un tableau les intitulés de la
cellule sélectionné par vba
exemple : si je selectionne la cellule F8, j'encadre A8,B8 (en un seul
cadre) et F2 (dans un autre cadre)

MERCI bcp !

2 réponses

Avatar
jt
"Angelus" a écrit dans le message de
news:
Bonjour
Je recherche 3 choses en fait (je débute en programmation VB) :-)
1) quel est la commande dans le vba de power point pour minimisé dans la
barre des taches windows un pps après une action. (clic sur un bouton
ouvrant
une fenêtre exploreur)
2) sous power point comment empéché l'ouverture d'un racourcie hypertexte
dans le cas où il serai déjà ouvert par une autre personne (fichier sur un
disque commun)
3) sous excel : je voudrai encadré dans un tableau les intitulés de la
cellule sélectionné par vba
exemple : si je selectionne la cellule F8, j'encadre A8,B8 (en un seul
cadre) et F2 (dans un autre cadre)

MERCI bcp !



Bonsoir
Voici la réponse à ta 3 eme question
Sub Encadre()
Dim Ligne As Long
Dim Col As Long
Dim Sel As Range
Ligne = ActiveCell.Row
Col = ActiveCell.Column
Set Sel = Cells(2, Col)
Sel.Borders(xlDiagonalDown).LineStyle = xlNone
Sel.Borders(xlDiagonalUp).LineStyle = xlNone
With Sel.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Set Sel = Cells(Ligne, 1).Range("A1:B1")
Sel.Borders(xlDiagonalDown).LineStyle = xlNone
Sel.Borders(xlDiagonalUp).LineStyle = xlNone
With Sel.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Sel.Borders(xlInsideVertical).LineStyle = xlNone
End Sub
Avatar
Angelus
Merci JT

"jt" a écrit :


"Angelus" a écrit dans le message de
news:
> Bonjour
> Je recherche 3 choses en fait (je débute en programmation VB) :-)
> 1) quel est la commande dans le vba de power point pour minimisé dans la
> barre des taches windows un pps après une action. (clic sur un bouton
> ouvrant
> une fenêtre exploreur)
> 2) sous power point comment empéché l'ouverture d'un racourcie hypertexte
> dans le cas où il serai déjà ouvert par une autre personne (fichier sur un
> disque commun)
> 3) sous excel : je voudrai encadré dans un tableau les intitulés de la
> cellule sélectionné par vba
> exemple : si je selectionne la cellule F8, j'encadre A8,B8 (en un seul
> cadre) et F2 (dans un autre cadre)
>
> MERCI bcp !

Bonsoir
Voici la réponse à ta 3 eme question
Sub Encadre()
Dim Ligne As Long
Dim Col As Long
Dim Sel As Range
Ligne = ActiveCell.Row
Col = ActiveCell.Column
Set Sel = Cells(2, Col)
Sel.Borders(xlDiagonalDown).LineStyle = xlNone
Sel.Borders(xlDiagonalUp).LineStyle = xlNone
With Sel.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Set Sel = Cells(Ligne, 1).Range("A1:B1")
Sel.Borders(xlDiagonalDown).LineStyle = xlNone
Sel.Borders(xlDiagonalUp).LineStyle = xlNone
With Sel.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Sel.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Sel.Borders(xlInsideVertical).LineStyle = xlNone
End Sub