Consulting

Results 1 to 2 of 2

Thread: 2 Macros Please Help getting so lost... to delete columns and email files

  1. #1

    2 Macros Please Help getting so lost... to delete columns and email files

    Hi There I need help with two macros...

    Firstly, I have a list laid out like below in excel.

    Column A (emails) Column B (filename)
    AatA Z.elx
    BatB Y.elx
    CatC X.elx

    All the files listed in column B are stored in "C:\Files"

    I need a macro that will firstly, Open each file in the list one by one
    Scan every column in the file from A to AZ "rows 2 to 20000" (yes purposely ignoring row 1). And if this scan returns blank (all the cells are empty) delete the entire column "Rows 1 to End". If it finds any data leave it alone move onto the next column. When it has scanned A to AZ save the file with same name, and move onto next file in list.

    Then i need a second macro that will go down the list and using the mail client "Lotus Notes". Email the file in Column B of the list (from the same "C:\Files" location) to the corresponding email address in column A. With a subject of "File" and email body of "Here is your file"

    Can anyone help I've been trying for days and it either deletes everything or nothing. And wont email at all unless i do it one at a time???

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    What kind on file is a *.elx ?

    What are you using to open it?

    Show us the code that you have been trying to make work.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •