sending active sheet by mail without macro (from Ron's page)

  • Thread starter Thread starter Guest
  • Start date Start date
Hi,
I am using Ron's Mail_ActiveSheet()http://www.rondebruin.nl/mail/folder2/mail2.htm

nut it is sending the sheet with the macro/vba - can it be sent without the
macro/vba?

Many thanks.
Dan

Before:

With Destwb

insert:

With Destwb.VBProject.VBComponents
.Remove VBComponent:=.Item("Module1")
End With

subbing the name of the module you want to delete for "Module1"

You'll have to tell your computer to trust access to vb components.
See http://support.microsoft.com/kb/282830 for how to do that.
 
Thank you,
But I am getting a "Run-time error '9' : subscript out of range", I am
guessing this is because I am trying to remove the macro on the sheet I am
sending and not on the module.

Dan
 
Hi Dan

If you copy the macro in a normal module in the workbook it will not
send the code.

Where have you paste the code and how do you run it ?
 
Thank you Ron,
But the code I am trying to remove is specific to the sheet I am trying to
send.
such as Private Sub Worksheet_Activate() & Sub
Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
so I cannot copy it over to another module.

Dan
 
OK, now I understand

You can use Cip's code
http://www.cpearson.com/excel/vbe.aspx

Or create a new workbook with one empty sheet and copy all the data in it with
code and send that workbook.
If you need help with the code let me know.

If you use Excel 2007 there is another option
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top