Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 361
Default Macro To Automate File Retrieval and Email

I would like to use a macro to do the following:

After Excel is opened, run the macro to do the following:

1.Open up the workbook j:project\market.xls
2.Prompt me to select a worksheet (they are named May 1, May 2, etc€¦)
3.After selecting the worksheet, email range A10:D100 to
4.Close the workbook with no changes


Is this possible ? Thank you in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Macro To Automate File Retrieval and Email


Is this possible ? Thank you in advance


Sure

1.Open up the workbook j:project\market.xls

Look at GetOpenFilename method in Excel help. This allows you to
navigate to the file and select it. If you know it will ALWAYS be
that filename at that file location, just hardcode the path and
filename.
set MyWB = workbooks.open ("j:project\market.xls")

2.Prompt me to select a worksheet (they are named May 1, May 2, etc...)

Search for 'Worksheets userform array' and you'll probably find plenty
of examples where the Worksheet names are loaded into an userform for
you to choose from.

3.After selecting the worksheet, email range A10:D100 to

I'm not 100% sure on this one, but you should be able to 'insert an
object' into the email through Outlook. The object would be the
range. You may have to record a macro in Outlook while you preform
this task manually the first time and see what kind of code it
generates.

4.Close the workbook with no changes

MyWB.Close SaveChanges:=False

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Retrieval Gulf South Excel Discussion (Misc queries) 6 May 7th 08 08:24 PM
How to automate with macro multiworksheet File using array variable? [email protected] Excel Programming 2 July 5th 06 08:06 PM
automate data retrieval from folder BillyRogers Excel Programming 0 January 27th 06 05:11 PM
file retrieval Myriam Excel Programming 3 July 18th 04 03:40 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 01:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"