+ Reply to Thread
Results 1 to 2 of 2

VBA auto email problem

  1. #1
    Registered User
    Join Date
    07-09-2020
    Location
    lousiana, usa
    MS-Off Ver
    365
    Posts
    1

    VBA auto email problem

    I'm trying to creating a command button to auto send the active sheet in an email. The VBA works intermittently, when it fails debug hits this line in the code.

    WB.SaveAs FileName:="C:" & FileName, FileFormat:=xlOpenXMLWorkbookMacroEnabled

    The error I get:

    Run-time error '1004':
    Microsoft Excel cannot access the file 'c:

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: VBA auto email problem

    .
    Untested ... but my first thought is the "backslash" is missing : WB.SaveAs FileName:="C:\"

+ 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. Button to Send email & auto add email address from cell
    By TheNerdyGeek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2019, 02:43 PM
  2. VBA Auto Email rfrom list and add Excel File for each Email address
    By russellhiedi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2019, 03:30 PM
  3. auto email form excel imputting specific row data for each email address + add graph
    By macroconfused in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2018, 01:59 AM
  4. VBA Code to Auto intialsend email & reminder email based on cell value
    By swk8429 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2015, 06:15 AM
  5. Auto send email with the cell value that triggered the email in the first place.
    By coobey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2013, 05:40 PM
  6. auto paste/forward email to folder/excel/wordreceive from a particular email ID
    By tariqnaz2005 in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 10-22-2009, 06:31 PM
  7. adding email addresses to auto email
    By Bigjayce in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2006, 10:25 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