MS Visual Basic is showing an alert box with error 400

Asked By 0 points N/A Posted on -
qa-featured

Whenever I turn on Microsoft Visual Basic I get a dialog box saying 400.


VB ERROR

What's the problem ?

SHARE
Answered By 15 points N/A #119145

MS Visual Basic is showing an alert box with error 400

qa-featured

Hello,

I have a solution for your problem in Microsoft Visual Basic. You

Sub SaveandSend()
ThisFile = Range("C6").Value
ThisFile1 = Range("C5").Value
ThisFile2 = Range("C3").Value
ActiveWorkbook.SaveAs Filename:="Survey – " & ThisFile & ThisFile1 & ThisFile2
'Working in 2000-2007
'This example send the last saved version of the Active Workbook
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = "[email protected]"
.Subject = "BM Survey"
.Attachments.Add ActiveWorkbook.FullName
.Send 'or use .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub

Hope this will be the best solution for you.

Related Questions