• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Script is not working on a file and i need to be fixed

Kindman_EG

New Member
Dear Team,
Your usual support is highly appreciated to check the root cause of the below issue and to be fixed and many thanks in advance.
I have attached two excel files "TEST-Before" & "TEST-After" as the first file is working properly and can send emails but when i edited the file and increased some columns it's not working.
Note: both are open and editable.
Regards,
Mohsen
 

Attachments

  • TEST - After.xlsb
    749.9 KB · Views: 1
  • TEST-Before.xlsb
    749 KB · Views: 3
Kindman_EG
Your After-version misses those email-addresses ++ from Your hidden columns.
>> Take care that AFTER-versions uses modified columns too
>> BEFORE those columns were R - V and
>> AFTER those columns are AC - AG
... Your codes works as well as before.
 
Hello Vletm,
Thanks a lot for your support, i applied your instructions and you can find below the screenshots.
you can realize that there are no values showing after updating the code and i need the results to be visible, please advise.
Note: updated sheet is attached
Regards,
Mohsen
 

Attachments

  • After Screenshot.jpg
    After Screenshot.jpg
    74.4 KB · Views: 5
  • Before Screenshot.jpg
    Before Screenshot.jpg
    52 KB · Views: 4
  • TEST - After.xlsb
    749.3 KB · Views: 3
Kindman_EG
You seems to Filter still 18th column ... which is R-column.
Ash.Range("A1:AC65000").AutoFilter Field:=18, Criteria1:=cell.Value
... if You're Filtering R-column instead of AC-column then ... You need to modify that too.
or
You could filter only with AC-column and then Field will be 1.
 
Hi Vletm,
I couldn't understand your what's exactly the required action.
Could you please apply on the attached file and many thanks in advance.
Regards,
Mohsen
 
Kindman_EG
I could apply
... but I could not test it ... because I don't use OutLook
and
You could study ... or how?

You added 'some' columns before You 'e-mail-address'-column.
the required action:
You need to take care that Your used code know that.
#1 You already modified For Each cell In Ash.Columns("AC") ... line 21
#2 You already modified Ash.Range("A1:AC65000").AutoFilter ... line 25
#3 ... but You missed to modify Field:= ... R-column is 18th and AC-column is ... what?
or
Your could do AutoFilter only with AC-column Ash.Range("AC1:AC65000").AutoFilter then Field:= would be 1
 
Back
Top