Automate a macro in an open spreadsheet (for dummies)

Johngalt1998

New Member
Joined
Mar 19, 2011
Messages
4
Disclaimer: while I can use the Excel macro recorder, I have zero knowledge of VBA, other than being able to spell it.

I have a spreadsheet that has live stock prices in it and changes throughout the business day. During the business day, I would like to email the spreadsheet, as an attachment, to a single recipient.

I have found an Outlook add-in that will allow me to automate the emailing of an attachment, but the file to be attached must always have the same name.

So I recorded a simple Excel macro that saves the spreadsheet (saving it over the original file name), but I don't know how to invoke the spreadsheet every 5 or 10 minutes.

If you have any suggestions, including an add-in to suggest, about this - that a dummy could do - please help!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Open Excel and Press ALT + F11 to open the VBA editor
In the toolbar select Insert / Module
You'll notice in the LH pane there is now a folder called module
Click on it and Paste this in the RH pane
Code:
Private Sub Workbook_Open()
  Application.OnTime Now + TimeValue("00:15:00"), "NAME OF YOUR MACRO HERE"
End Sub

Now save and close
The next time you open the workbook it will run your macro every 15 minutes, whileever the workbook is open
 
Upvote 0
Don't worry, if you hang around here long enough, you will start to contribute !!
First thing to do, is learn about the stuff you need, then you can pass on your new found knowledge.
 
Upvote 0
Please don't laugh at me, but...

Do you have any counsel for Excel 2003?



Open Excel and Press ALT + F11 to open the VBA editor
In the toolbar select Insert / Module
You'll notice in the LH pane there is now a folder called module
Click on it and Paste this in the RH pane
Code:
Private Sub Workbook_Open()
  Application.OnTime Now + TimeValue("00:15:00"), "NAME OF YOUR MACRO HERE"
End Sub

Now save and close
The next time you open the workbook it will run your macro every 15 minutes, whileever the workbook is open
 
Upvote 0
Everyone on this Board is using either / both / all versions of Excel
Some still have Lotus and other skills

Also, the macro provided will work in earlier versions than 2007.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

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