+ Reply to Thread
Results 1 to 4 of 4

Mail_ActiveSheet and DeleteAllCodeInModule

  1. #1
    Yngve
    Guest

    Mail_ActiveSheet and DeleteAllCodeInModule

    Hi al

    The combination of Ron De Bruin "Mail_ActiveSheet" and Pearson
    "DeleteAllCodeInModule"
    is an briliant solution for me. Now I can send only the sheet whitout
    code`s behind.

    Manny thanks to both of you.

    If other need`s the code !!!




    Sub Mail_ActiveSheet()
    Dim wb As Workbook
    Dim strdate As String
    strdate = Format(Now, "dd-mm-yy h-mm-ss")
    Application.ScreenUpdating = False
    ActiveSheet.Copy
    Set wb = ActiveWorkbook
    DeleteAllCodeInModule
    With wb
    .SaveAs "Part of " & ThisWorkbook.Name _
    & " " & strdate & ".xls"
    .SendMail "[email protected]", _
    "This is the Subject line"
    .ChangeFileAccess xlReadOnly
    Kill .FullName
    .Close False
    End With
    Application.ScreenUpdating = True
    End Sub

    ' referanse = "Microsoft Visual
    'Basic For Applications Extensibility 5.3".
    Sub DeleteAllCodeInModule()
    Dim VBCodeMod As CodeModule
    Dim StartLine As Long
    Dim HowManyLines As Long

    Set VBCodeMod = ActiveWorkbook.VBProject. _
    VBComponents("Ark1").CodeModule
    With VBCodeMod
    StartLine = 1
    HowManyLines = .CountOfLines
    .DeleteLines StartLine, HowManyLines
    End With

    End Sub

    Regards Yngve


  2. #2
    Ron de Bruin
    Guest

    Re: Mail_ActiveSheet and DeleteAllCodeInModule

    Hi Yngve

    My add-in have this option also if you not want to use VBA
    http://www.rondebruin.nl/mail/add-in.htm

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Yngve" <[email protected]> wrote in message news:[email protected]...
    > Hi al
    >
    > The combination of Ron De Bruin "Mail_ActiveSheet" and Pearson
    > "DeleteAllCodeInModule"
    > is an briliant solution for me. Now I can send only the sheet whitout
    > code`s behind.
    >
    > Manny thanks to both of you.
    >
    > If other need`s the code !!!
    >
    >
    >
    >
    > Sub Mail_ActiveSheet()
    > Dim wb As Workbook
    > Dim strdate As String
    > strdate = Format(Now, "dd-mm-yy h-mm-ss")
    > Application.ScreenUpdating = False
    > ActiveSheet.Copy
    > Set wb = ActiveWorkbook
    > DeleteAllCodeInModule
    > With wb
    > .SaveAs "Part of " & ThisWorkbook.Name _
    > & " " & strdate & ".xls"
    > .SendMail "[email protected]", _
    > "This is the Subject line"
    > .ChangeFileAccess xlReadOnly
    > Kill .FullName
    > .Close False
    > End With
    > Application.ScreenUpdating = True
    > End Sub
    >
    > ' referanse = "Microsoft Visual
    > 'Basic For Applications Extensibility 5.3".
    > Sub DeleteAllCodeInModule()
    > Dim VBCodeMod As CodeModule
    > Dim StartLine As Long
    > Dim HowManyLines As Long
    >
    > Set VBCodeMod = ActiveWorkbook.VBProject. _
    > VBComponents("Ark1").CodeModule
    > With VBCodeMod
    > StartLine = 1
    > HowManyLines = .CountOfLines
    > .DeleteLines StartLine, HowManyLines
    > End With
    >
    > End Sub
    >
    > Regards Yngve
    >




  3. #3
    Yngve
    Guest

    Re: Mail_ActiveSheet and DeleteAllCodeInModule

    Hi Ron

    Thank`s alot, I have download and will try i out, maybee I should
    investegate your page more.

    Regards Yngve


  4. #4
    Yngve
    Guest

    Re: Mail_ActiveSheet and DeleteAllCodeInModule

    Hi Ron

    Thank`s alot, I have download and will try i out, maybee I should
    investegate your page more.

    Regards Yngve


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1