+ Reply to Thread
Results 1 to 8 of 8

Increase Range if VBA without Error

  1. #1
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Increase Range if VBA without Error

    Hi All

    I am using the code listed below to email out files automatically (each file is different for each recipient), I am trying to increase the range so that I can potentially send 25 emails on one click if/when the data needs to be distributed. but I can't find a way to ignore blanks without error

    The only ranges that change are rngto (which should expand from B7 to B36) and rngAttach (which should expand from C7 to C36)

    Any help would be great as I am completely clueless when it comes to code

    Thanks

    Danny

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Increase Range if VBA without Error

    Hi, please attach your file...
    You dont have to attach e-mail addresses, just put any dummy e-mail adresses...
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

  3. #3
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Increase Range if VBA without Error

    Hi thanks for the reply, the file has been attached

    You will see it is relatively straightforward

    Danny
    Attached Files Attached Files

  4. #4
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Increase Range if VBA without Error

    Please try that...
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Increase Range if VBA without Error

    Where abouts would I put that in?

  6. #6
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Increase Range if VBA without Error

    Change this;
    Please Login or Register  to view this content.
    with this;
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Increase Range if VBA without Error

    Ok, I also noticed that the code will only produce one email so I used the following

    Please Login or Register  to view this content.
    I found the mid section where you had the On Error so I changed the above to

    Please Login or Register  to view this content.
    But what I got was 2 correct emails with the correct data on them then a dozen or so blank emails, but I am aiming for just the correct ones to be populate an then nothing for empty details or errors

    Thanks

    For you help on this

  8. #8
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Increase Range if VBA without Error

    Solved half of it. thanks for your help

+ 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. Increase range in an IF statement
    By Boubou009 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2014, 11:37 PM
  2. Increase Each Number By 1 In A Given Range
    By mightyeskimo in forum Excel General
    Replies: 9
    Last Post: 03-05-2012, 09:33 AM
  3. Increase range by one using a dynamic range
    By jeffreybrown in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-02-2011, 04:45 PM
  4. Increase the corce data range using vba or named range
    By rajgud1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2009, 09:18 AM
  5. Range % Increase
    By Steve C in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2005, 05:10 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