+ Reply to Thread
Results 1 to 4 of 4

Drop down list disappears when spreadsheet is send via email

  1. #1
    Registered User
    Join Date
    08-05-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    55

    Drop down list disappears when spreadsheet is send via email

    I have a number of drop down boxes (lists) in my spreadsheet, when i sent it as an attachment through outlook it seems the other side it dosent allow the drop down boxes to be shown.

    Does any one know why and can this be prevented.

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Drop down list disappears when spreadsheet is send via email

    Sounds like u send your e-maill as a message body. When u send as an excel file as body of a message , all formulas .., in short all features of excel are "turned off".
    Try to send as an attachment
    Last edited by contaminated; 01-12-2010 at 06:11 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Registered User
    Join Date
    08-05-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    55

    Re: Drop down list disappears when spreadsheet is send via email

    Sub Mail_workbook_Outlook_2()

    Dim wb1 As Workbook
    Dim wb2 As Workbook
    Dim TempFilePath As String
    Dim request As String
    Dim FileExtStr As String
    Dim OutApp As Object
    Dim OutMail As Object

    Set wb1 = ActiveWorkbook

    If Val(Application.Version) >= 12 Then
    If wb1.FileFormat = 51 And wb1.HasVBProject = True Then
    MsgBox "There is VBA code in this xlsx file, there will" & vbNewLine & _
    "be no VBA code in the file you send. Save the" & vbNewLine & _
    "file first as xlsm and then try the macro again.", vbInformation
    Exit Sub
    End If
    End If

    With Application
    .ScreenUpdating = False
    .EnableEvents = False
    End With

    TempFilePath = Environ$("temp") & "\"
    request = "Copy of " & wb1.Name & " " & Format(Now, "dd-mmm-yy h-mm-ss")
    FileExtStr = "." & LCase(Right(wb1.Name, _
    Len(wb1.Name) - InStrRev(wb1.Name, ".", , 1)))

    wb1.SaveCopyAs TempFilePath & request & FileExtStr
    Set wb2 = Workbooks.Open(TempFilePath & request & FileExtStr)

    Set OutApp = CreateObject("Outlook.Application")
    OutApp.Session.Logon
    Set OutMail = OutApp.CreateItem(0)

    On Error Resume Next
    With OutMail
    .To = ""
    .CC = ""
    .BCC = ""
    .Subject = "LPM Request Form"
    .Body = "LPM User information"
    .Attachments.Add wb2.FullName

    .Send
    End With
    On Error GoTo 0

    wb2.Close SaveChanges:=False


    Kill TempFilePath & request & FileExtStr

    Set OutMail = Nothing
    Set OutApp = Nothing

    With Application
    .ScreenUpdating = True
    .EnableEvents = True
    End With
    End Sub

    As you can see its not saved under the body

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Drop down list disappears when spreadsheet is send via email

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1