Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Where to store VBA code for executing against xls in email?

I get daily an xls report in my outlook email against which I would
like run some VBA code

Where should I keep this VBA code?
Storing in sheet or workbook won't help because I get a new xls daily.

I am a beginner to excel programming.

Thanks for your help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Where to store VBA code for executing against xls in email?

Do you run code against the report (and that's all you do with it) or do you
run code against the daily report, and shove the results into a master data
workbook that stores your output across multiple days? Will other workers
need to be able to run the code when you are on vacation or sick?

As a general rule, when I am aggregating data over time, I store the code in
the workbook where the aggregate data is stored.

If I just need to see a one-time result (and not store the results in a
centralized workbook), and if I'm generally the only one who will need to run
the code, I save it in my "personal" workbook.

In Excel2003, if you press alt-F11 to open the VBA window, then press Ctrl-R
to make sure the "Project-VBA Project" sub-window is visible, you will see an
item called "VBAProject(Personal.xls). I keep all sorts of code snippets in
there that I use on multiple different workbooks so I don't have to add the
code to each of those workbooks. In Excel 2007 I don't believe that the
personal.xls is shown in the "project" window by default, and there is
probably some cool key combination to show it, but I'm so rarely in 2007 I
haven't looked for it yet- my workaround is to record a macro and tell it to
store it in the personal workbook (I just select one cell to create the
macro), then personal.xls will show in the 2007 VBA project window.

When placing code in the personal workbook, be sure to maintain good coding
practices and fully reference your target workbook, e.g. something like
"activeworkbook.activeworksheet.range("A1").va lue instead of just
range("A1").value


HTH,
Keith
"Diwa" wrote:

I get daily an xls report in my outlook email against which I would
like run some VBA code

Where should I keep this VBA code?
Storing in sheet or workbook won't help because I get a new xls daily.

I am a beginner to excel programming.

Thanks for your help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Where to store VBA code for executing against xls in email?

Check this out:
http://www.rondebruin.nl/personal.htm

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"ker_01" wrote:

Do you run code against the report (and that's all you do with it) or do you
run code against the daily report, and shove the results into a master data
workbook that stores your output across multiple days? Will other workers
need to be able to run the code when you are on vacation or sick?

As a general rule, when I am aggregating data over time, I store the code in
the workbook where the aggregate data is stored.

If I just need to see a one-time result (and not store the results in a
centralized workbook), and if I'm generally the only one who will need to run
the code, I save it in my "personal" workbook.

In Excel2003, if you press alt-F11 to open the VBA window, then press Ctrl-R
to make sure the "Project-VBA Project" sub-window is visible, you will see an
item called "VBAProject(Personal.xls). I keep all sorts of code snippets in
there that I use on multiple different workbooks so I don't have to add the
code to each of those workbooks. In Excel 2007 I don't believe that the
personal.xls is shown in the "project" window by default, and there is
probably some cool key combination to show it, but I'm so rarely in 2007 I
haven't looked for it yet- my workaround is to record a macro and tell it to
store it in the personal workbook (I just select one cell to create the
macro), then personal.xls will show in the 2007 VBA project window.

When placing code in the personal workbook, be sure to maintain good coding
practices and fully reference your target workbook, e.g. something like
"activeworkbook.activeworksheet.range("A1").va lue instead of just
range("A1").value


HTH,
Keith
"Diwa" wrote:

I get daily an xls report in my outlook email against which I would
like run some VBA code

Where should I keep this VBA code?
Storing in sheet or workbook won't help because I get a new xls daily.

I am a beginner to excel programming.

Thanks for your help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Where to store VBA code for executing against xls in email?

And if you want to get the attachments automatic out of the mail see
http://www.rondebruin.nl/mail/folder2/saveatt.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"ryguy7272" wrote in message ...
Check this out:
http://www.rondebruin.nl/personal.htm

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"ker_01" wrote:

Do you run code against the report (and that's all you do with it) or do you
run code against the daily report, and shove the results into a master data
workbook that stores your output across multiple days? Will other workers
need to be able to run the code when you are on vacation or sick?

As a general rule, when I am aggregating data over time, I store the code in
the workbook where the aggregate data is stored.

If I just need to see a one-time result (and not store the results in a
centralized workbook), and if I'm generally the only one who will need to run
the code, I save it in my "personal" workbook.

In Excel2003, if you press alt-F11 to open the VBA window, then press Ctrl-R
to make sure the "Project-VBA Project" sub-window is visible, you will see an
item called "VBAProject(Personal.xls). I keep all sorts of code snippets in
there that I use on multiple different workbooks so I don't have to add the
code to each of those workbooks. In Excel 2007 I don't believe that the
personal.xls is shown in the "project" window by default, and there is
probably some cool key combination to show it, but I'm so rarely in 2007 I
haven't looked for it yet- my workaround is to record a macro and tell it to
store it in the personal workbook (I just select one cell to create the
macro), then personal.xls will show in the 2007 VBA project window.

When placing code in the personal workbook, be sure to maintain good coding
practices and fully reference your target workbook, e.g. something like
"activeworkbook.activeworksheet.range("A1").va lue instead of just
range("A1").value


HTH,
Keith
"Diwa" wrote:

I get daily an xls report in my outlook email against which I would
like run some VBA code

Where should I keep this VBA code?
Storing in sheet or workbook won't help because I get a new xls daily.

I am a beginner to excel programming.

Thanks for your help.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Where to store VBA code for executing against xls in email?

On Jul 31, 3:49*pm, ker_01 wrote:
Do you run code against the report (and that's all you do with it) or do you
run code against the daily report, and shove the results into a master data
workbook that stores your output across multiple days? Will other workers
need to be able to run the code when you are on vacation or sick?


Thanks for the detailed response. Its a one-time execution. No
aggregation.
Eventually, this should be usable by other team members too.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Where to store VBA code for executing against xls in email?


In Excel2003, if you press alt-F11 to open the VBA window, then press Ctrl-R
to make sure the "Project-VBA Project" sub-window is visible, you will see an
item called "VBAProject(Personal.xls). I keep all sorts of code snippets in
there that I use on multiple different workbooks so I don't have to add the
code to each of those workbooks. In Excel 2007 I don't believe that the
personal.xls is shown in the "project" window by default, and there is
probably some cool key combination to show it, but I'm so rarely in 2007 I
haven't looked for it yet- my workaround is to record a macro and tell it to
store it in the personal workbook (I just select one cell to create the
macro), then personal.xls will show in the 2007 VBA project window.


Thanks, keeping my xls in excel\xlstart dir worked. It was in my home
drive on network (not in c:). I used the cmd in Immediate windows to
get the actual dir.
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
Best practice for executing code Steven Sutton Excel Programming 2 March 17th 08 10:07 PM
How to store email id's? Raj Babbar Excel Discussion (Misc queries) 1 January 14th 07 03:52 AM
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM
Code not executing iwrk4dedpr[_6_] Excel Programming 3 June 3rd 04 07:48 AM
Code Changes Not Executing Justin[_8_] Excel Programming 1 October 24th 03 02:31 AM


All times are GMT +1. The time now is 03:05 AM.

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

About Us

"It's about Microsoft Excel"