+ Reply to Thread
Results 1 to 4 of 4

Excel-to-eMail Code Works Only When Stepping Through

  1. #1
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Excel-to-eMail Code Works Only When Stepping Through

    Hello All,

    I have a macro that writes the Contact Name and Contact e-Mail of a customer in a cell on their Excel Sheet, through the use of VLOOKUP (which works 100% as intended). Then, the Contact Name and Contact e-Mail gets sent to a variable for use by another macro that e-Mails a HTML version of the Sheet, places the Contact e-Mail in the To field, and the Contact Name into the body (it then deletes the sheet).

    The second macro works 100% as intended with no errors on the developer machine. However, it isn't working for the users and it does not return an error. However, if I "step through the code" line by line, it works fine on developer or user machine. Is it possible that the code is executing to quickly to allow the VBA-entered formula to work?

    If so, is there a way to program a delay to allow the program to take it easy? If so, what is a solid "wait period" for inbetween sub routines?

    I appreciate all of your help.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Excel-to-eMail Code Works Only When Stepping Through

    Can we see your code?
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Excel-to-eMail Code Works Only When Stepping Through

    No. I cannot do that. Is there a way to program delays between subs or lines?
    Thank You,

    EnigmaMatter

  4. #4
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Excel-to-eMail Code Works Only When Stepping Through

    I never resolved the issue or changed the code.

    Eventually, on two seperate occasions, just started working for the user.

+ 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. VBA code behaves differently while stepping?
    By mhni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2009, 09:01 AM
  2. Stepping through Code
    By ben in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-08-2006, 05:50 PM
  3. How to get value of variable when single stepping through code?
    By Chet Shannon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-22-2005, 05:55 PM
  4. Code works when stepping through, but cuts out when run
    By Reenen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2005, 07:47 AM
  5. Replies: 0
    Last Post: 02-28-2005, 03: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