ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sending active sheet by mail without macro (from Ron's page) (https://www.excelbanter.com/excel-programming/400793-sending-active-sheet-mail-without-macro-rons-page.html)

dan

sending active sheet by mail without macro (from Ron's page)
 
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

[email protected]

sending active sheet by mail without macro (from Ron's page)
 
On Nov 8, 3:09 am, Dan wrote:
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


Befo

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.


dan

sending active sheet by mail without macro (from Ron's page)
 
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

" wrote:

On Nov 8, 3:09 am, Dan wrote:
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


Befo

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.



Ron de Bruin

sending active sheet by mail without macro (from Ron's page)
 
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 ?



--

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


"Dan" wrote in message ...
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

" wrote:

On Nov 8, 3:09 am, Dan wrote:
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


Befo

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.



dan

sending active sheet by mail without macro (from Ron's page)
 
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

"Ron de Bruin" wrote:

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 ?



--

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


"Dan" wrote in message ...
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

" wrote:

On Nov 8, 3:09 am, Dan wrote:
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

Befo

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.




Ron de Bruin

sending active sheet by mail without macro (from Ron's page)
 
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







--

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


"Dan" wrote in message ...
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

"Ron de Bruin" wrote:

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 ?



--

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


"Dan" wrote in message ...
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

" wrote:

On Nov 8, 3:09 am, Dan wrote:
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

Befo

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.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com