Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Need to disable my vba macro once I email out the file.

I have a macro that opens automatically, runs a couple of calculations and is
programmed to email the completed workbook at the end. I want a way to
disable the macro when i send it so when it is opened by the recipients, the
macro does not automatically start again.

Thanks,

Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Need to disable my vba macro once I email out the file.

On Apr 17, 2:14*pm, Chris wrote:
I have a macro that opens automatically, runs a couple of calculations and is
programmed to email the completed workbook at the end. *I want a way to
disable the macro when i send it so when it is opened by the recipients, the
macro does not automatically start again.

Thanks,

Chris


You can save a copy of the file you produce and delete the code inside
it ... or else modify the code so that it's in a workbook all by
itself and it works on a different file ...

As for disabling the macro ... you could check for the username
(something like this
http://groups.google.com/group/micro...c180f20f310923
) and only run the code if you're the logged-in user ... or you could
require a password to start the code ... etc

HTH

Chris
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Need to disable my vba macro once I email out the file.

Do you know any code off hand that would allow me to save the file and delete
out the vba like you stated at the beginning of the reply?

Thanks...

"cht13er" wrote:

On Apr 17, 2:14 pm, Chris wrote:
I have a macro that opens automatically, runs a couple of calculations and is
programmed to email the completed workbook at the end. I want a way to
disable the macro when i send it so when it is opened by the recipients, the
macro does not automatically start again.

Thanks,

Chris


You can save a copy of the file you produce and delete the code inside
it ... or else modify the code so that it's in a workbook all by
itself and it works on a different file ...

As for disabling the macro ... you could check for the username
(something like this
http://groups.google.com/group/micro...c180f20f310923
) and only run the code if you're the logged-in user ... or you could
require a password to start the code ... etc

HTH

Chris

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default Need to disable my vba macro once I email out the file.

Look at Chip Pearson's site:

http://www.cpearson.com/excel/vbe.aspx

Cliff Edwards
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
how do I disable spell check in email sent from Excel macro RocketRod Excel Programming 0 February 13th 08 12:02 AM
File opens with Enable or Disable Macro animalfriend7 Excel Discussion (Misc queries) 1 November 8th 06 04:29 PM
how to open xla file in automation way with disable macro Arnaud Excel Programming 0 September 12th 05 10:11 AM
how to open xla file in automation way with disable macro Arnaud Excel Programming 1 September 9th 05 03:03 PM


All times are GMT +1. The time now is 01:52 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"