+ Reply to Thread
Results 1 to 3 of 3

Having Trouble Modifying Excel Sheet With Outlook

  1. #1
    Registered User
    Join Date
    06-02-2014
    Posts
    23

    Having Trouble Modifying Excel Sheet With Outlook

    Okay so here is the code that I've been trying to make work to extract data from certain e-mails and put it into a master Excel file:

    Please Login or Register  to view this content.
    I have been running into several issues. First is that in order for the script to fill the cells, cell A1 needs to be selected in the Excel doc before I save and close it. The biggest issue comes from when I try to have subsequent e-mails come in. The script stops and the error says "Method 'Rows' of object '_Global' failed." When I run debug it points to the line "iR = oWS.Cells(Rows.Count, 1).End(xlUp).Row + 1" and I am not sure how to modify it so that it will work.

    Thanks, you guys are the best!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Having Trouble Modifying Excel Sheet With Outlook

    Why does A1 need to be selected in the Excel workbook?

    As for the error, xlUp is an Excel VBA constant, it means nothing in Outlook VBA.

    To fix that add this.
    Please Login or Register  to view this content.
    Also, Rows.Count is Excel VBA too.

    Try this, it adds a reference to the Excel worksheet for Rows.Count.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-02-2014
    Posts
    23

    Re: Having Trouble Modifying Excel Sheet With Outlook

    That worked perfectly, thank you!

+ 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. [SOLVED] Having trouble with modifying If formula
    By tangfastic1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2014, 09:06 AM
  2. Replies: 0
    Last Post: 05-23-2013, 04:39 PM
  3. Replies: 2
    Last Post: 02-25-2009, 02:09 AM
  4. trouble auto sending excel sheet via outlook
    By Picto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2007, 08:04 AM
  5. [SOLVED] Trouble attaching an Excel file in Outlook 2003 - Help
    By Lionel in forum Excel General
    Replies: 1
    Last Post: 04-09-2005, 05:06 PM

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