Trying to find a set of code that I can use to open a website that's predetermined, and enter in the users name and password automatically. And if possible, open a new email via the website, addressed to a person, and ready to browse for the file to attach.
The code I have is below.
Private Sub CommandButton1_Click()
'
storenumber = [$c$3]
If [$iv$2] = True Then
If [$iv$3] <> 0 Then
MsgBox ("Can't send with No Adjustments Checked & Items to Adjust, Please clear one")
End
End If
End If
If [$iv$2] = False Then
If [$iv$3] = 0 Then
MsgBox ("Can't send without No Adjustments checked or Items to Adjust")
End
End If
End If
If MsgBox( _
prompt:="Ready to Send Adjustments?", _
Title:="Proceed?", _
Buttons:=vbYesNo) = vbYes Then
Application.ScreenUpdating = False
ActiveSheet.Copy
ActiveSheet.Shapes("CommandButton1").Select
Selection.Delete
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs "Store #" & storenumber & " - SEND THIS FILE" & " To Cathy" & ".xls"
Application.DisplayAlerts = True
ActiveWorkbook.Close False
MsgBox ("Please open a new email addressed to Cathy Mandeville, and attach the file named Store #" & storenumber & " - SEND THIS FILE To Cathy.xls")
Else
MsgBox "Please Finish Adjustments"
'user chose not to send file yet
End
End If
ThisWorkbook.Saved = True
ActiveWorkbook.FollowHyperlink Address:="https://webmail.albertsons.com/exchange", _
NewWindow:=True
Application.Quit
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Thanks for the help in advance.
The code I have is below.
Private Sub CommandButton1_Click()
'
storenumber = [$c$3]
If [$iv$2] = True Then
If [$iv$3] <> 0 Then
MsgBox ("Can't send with No Adjustments Checked & Items to Adjust, Please clear one")
End
End If
End If
If [$iv$2] = False Then
If [$iv$3] = 0 Then
MsgBox ("Can't send without No Adjustments checked or Items to Adjust")
End
End If
End If
If MsgBox( _
prompt:="Ready to Send Adjustments?", _
Title:="Proceed?", _
Buttons:=vbYesNo) = vbYes Then
Application.ScreenUpdating = False
ActiveSheet.Copy
ActiveSheet.Shapes("CommandButton1").Select
Selection.Delete
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs "Store #" & storenumber & " - SEND THIS FILE" & " To Cathy" & ".xls"
Application.DisplayAlerts = True
ActiveWorkbook.Close False
MsgBox ("Please open a new email addressed to Cathy Mandeville, and attach the file named Store #" & storenumber & " - SEND THIS FILE To Cathy.xls")
Else
MsgBox "Please Finish Adjustments"
'user chose not to send file yet
End
End If
ThisWorkbook.Saved = True
ActiveWorkbook.FollowHyperlink Address:="https://webmail.albertsons.com/exchange", _
NewWindow:=True
Application.Quit
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Thanks for the help in advance.