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
| Option Explicit
Declare Function ShowWindow Lib "user32" ( _
ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Const SW_MAXIMIZE = 3
Sub OuvrirInternet()
Dim NomAppli As String, AdresseHTTP As String
'Va dans le menu Outils, références... et coche Microsoft Internet controls
Dim Iexplorer As New InternetExplorer
With Worksheets("commande")
.Range("A1", .Cells(.Rows.Count, "A").End(xlUp).Offset(0, 4)).Copy
End With
Worksheets("Gestion Bobine").Select
Range("A1").Select
MsgBox "Envoyer la Résa ?", vbExclamation, Title:="RAPPEL"
If MsgBox(msg, vbYesNo + vbDefaultButton1, "Continuer ?") = vbYes Then
MsgBox "Vous allez ouvrir la boite mail du MVMS. Ouvrez un nouveau message puis faites un clic droit et coller la résa.bobine.", vbExclamation
Iexplorer.Navigate "https://gmail.com"
Iexplorer.Visible = True
ShowWindow Iexplorer.hwnd, SW_MAXIMIZE
'NomAppli = "C:\Program Files\Internet Explorer\IEXPLORE.EXE "
'AdresseHTTP = "https://gmail.com"
'n = NomAppli + AdresseHTTP
'Call Shell(n, 3)
ElseIf réponse = vbNo Then
'Worksheets("Gestion Bobine").Select'inutile on y est déjà
'Range("A1").Select
MsgBox "Votre résa. bobines n'a pas été envoyé au dépôt!", vbInformation
End If
End Sub |
Partager