VBS to copy a range of cells and email in an outlook body

seesamad

New member
Joined
Jul 4, 2013
Messages
3
Reaction score
0
Points
0
Good Morning KEN,
I need VBS to copy a range of cells (A1: D13) and email in an outlook body. Please note i need automated scrip that i want to schedule it for daily useage. My sheet is connected with database that updates after 14 hrs and i'll schedule this vbs to send me & my team dashboard ( Cell ranges) in an email body .

Appreciate if you please respond quickly !!!
 
Hi there,

The approach I would probably take with this (and I'm not saying this is the only, right or best way) is to develop it in Excel first, then convert it to VBS afterwards. That way you get the benefit of all the debugging suite without guessing where your code went wrong. The secret is to convert everything to a late bound version for the VBS script.

Do you have any programming experience at all, and have you got any of this working in Excel yet?
 
Hi Ken, thank you very much for getting back to me. yes i do have excel sheet connected with DBserver and its updating timely.I just need a VBS script that copying range of cells and email . Later i will schedule this .vbs file. thats it !!!



Hi there,

The approach I would probably take with this (and I'm not saying this is the only, right or best way) is to develop it in Excel first, then convert it to VBS afterwards. That way you get the benefit of all the debugging suite without guessing where your code went wrong. The secret is to convert everything to a late bound version for the VBS script.

Do you have any programming experience at all, and have you got any of this working in Excel yet?
 
So... is this workbook running and open all the time then? You want to connect to the open Excel instance, or do you need to have the macro open the workbook first, then copy the cells? Is the range of cells being copied always the same or does it change?
 
So... is this workbook running and open all the time then? You want to connect to the open Excel instance, or do you need to have the macro open the workbook first, then copy the cells? Is the range of cells being copied always the same or does it change?

my excel always opens in and it is connected with SQL server(query embedded) and retrieving my requested data time by time. I need somethign tht copies range of cell and email my team the body autmatically
 
So here's a question for you. If Excel is always open and running, is there any reason why you can't schedule this using VBA inside Excel, rather than using VBS? Coding from VBS to grab the open workbook is going to be a pain, while scheduling from inside VBA should be relatively easy...
 
Back
Top