Select range in excel and save as text file & email - Macro

harryco79

Board Regular
Joined
Dec 15, 2004
Messages
166
Hello VB gods,
I have searched past posts but have found nothing to really help me with my macro solution.

In essence, I want a macro that I can attach to a button that will

a) Select a range of values in Active Sheet (eg. A4:A67)

b) Save to a Txt (.txt) file with a specific name from cell "A1" in active sheet

c) Prompt the user as to where he/she wants to save this file (desktop, documents folder,...etc)

d) and Once the txt file is saved will prompt the user if they want to email to a specific address. if the user select yes then it activates the default email program and attaches the file with the subject header "Gas Log file" and emails to a specific address e.g. "gaslog@gmail.com"....if the user select no, then it only just saves the txt file.

Pls help excel gurus/gods. Much appreciate it in advance
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top