+ Reply to Thread
Results 1 to 2 of 2

Help with Excel to Outlook E-mail

  1. #1
    Registered User
    Join Date
    08-19-2019
    Location
    United Kingdom
    MS-Off Ver
    2016
    Posts
    1

    Help with Excel to Outlook E-mail

    Hello!

    I need some desperate help with a spreadsheet and Visual Basic.

    Users fill in some fields on the spreadsheet, then tick some boxes and hit a "send e-mail" button. Visual Basic then copies a selection of the spreadsheet into the body of on Outlook e-mail and populates the recipients based on what tick boxes were selected in the spreadsheet. Unfortunately, when clicking "send e-mail", I get an error saying "unable to get the SpecialCells property of the Range class".

    I've changed real e-mail addresses in the code to addresshere for obvious reasons.

    This is in VBAProject > Microsoft Excel Objects > Sheet1

    Please Login or Register  to view this content.
    This is in VBAProject > Modules > Module1

    Please Login or Register  to view this content.
    Any ideas why it's failing at the "For Each cell In Columns("P").Cells.SpecialCells(xlCellTypeVisible)" line?
    Last edited by Ingenium; 08-19-2019 at 05:54 PM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Help with Excel to Outlook E-mail

    It usually means there were no visible cells in the range. Try rewriting your code without using Activesheet or Activecell. Be aware that select and active are not necessarily the same thing.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Outlook VBA - Mail to Excel
    By pradeepdeepu_001 in forum Outlook Programming / VBA / Macros
    Replies: 3
    Last Post: 02-19-2018, 02:02 AM
  2. [VBA] Outlook Mail to Excel
    By alexgoaga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-31-2017, 04:37 AM
  3. excel reminder mail to outlook
    By burc67 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-03-2016, 08:30 AM
  4. E-mail from excel to outlook
    By rajuganapathy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2015, 09:02 AM
  5. [SOLVED] Code to send mail copying from Excel to a new outlook mail.
    By paz1987 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-11-2015, 07:54 AM
  6. [SOLVED] screenshot text file and embed in outlook mail through excel with mail info
    By bmbalamurali in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 01-11-2015, 08:21 PM
  7. [SOLVED] e-mail from excel when outlook is not in use
    By Jignesh Khandwala in forum Excel General
    Replies: 5
    Last Post: 04-07-2006, 05:00 AM

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