+ Reply to Thread
Results 1 to 5 of 5

Is this macros are correct ?

  1. #1
    Registered User
    Join Date
    12-26-2013
    Location
    Kolkata
    MS-Off Ver
    Excel 2007
    Posts
    9

    Is this macros are correct ?

    1. Macro for Sending one mail by attaching one particula sheets:


    Sub Macro1()

    'Set outapp = CreateObject("Outlook.Application")

    Dim OutApp As Object
    Dim OutMail As Object

    Set OutApp = CreateObject("Outlook.application")
    Set OutMail = OutApp.CreateItem(0)

    On Error Resume Next

    With OutMail

    .To = "[email protected]"
    .CC = "[email protected]" & " ; " & "[email protected]"

    .Subject = "Process Notes "

    .Body = "Hello Ram," & vbNewLine & vbNewLine & "Please find attached the process notes as Of now." & vbNewLine & vbNewLine & "Please let me know if you need any further changes."

    .Attachments.Add CurrentWorkbook.FullName

    '.Send
    .display

    End With

    On Error GoTo 0

    Set OutMail = Nothing

    Set AppMail = Nothing


    'Sheets("Sheet2").Select
    End Sub



    2. Macros for going to different sheets:



    Sub MasterSheet()
    Worksheets("MASTER SHEET").Select
    End Sub

    Sub MasterSheet1()
    Worksheets("MASTER SHEET").Select
    End Sub


    Sub MasterSheet2()
    Worksheets("MASTER SHEET").Select
    End Sub


    Sub MasterSheet3()
    Worksheets("MASTER SHEET").Select
    End Sub

    Sub MasterSheet4()
    Worksheets("MASTER SHEET").Select
    End Sub


    Sub MasterSheet5()
    Worksheets("MASTER SHEET").Select
    End Sub



    Sub MasterSheet6()
    Worksheets("MASTER SHEET").Select
    End Sub

    Sub Click()
    Worksheets("VOLUME").Select
    End Sub


    Sub PRODUCTIONDETAILS()
    Worksheets("PROD DETAILS").Select
    End Sub


    Sub DAILYVOLUME()
    Worksheets("DAILY").Select
    End Sub

    Sub WEEKLYVOLUME()
    Worksheets("WEEKLY").Select
    End Sub

    Sub MONTHLYVOLUME()
    Worksheets("MONTHLY").Select
    End Sub

    Sub QUARTERLYVOLUME()
    Worksheets("QUARTERLY").Select
    End Sub

    Sub HALFYEARLYVOLUME()
    Worksheets("HALFYEARLY").Select
    End Sub

    Sub ANNUALVOLUME()
    Worksheets("ANNULLY").Select
    End Sub


    Sub TrainingLists()
    Worksheets("TRAINING LIST").Select
    End Sub

    Sub TRAININGDUE()
    Worksheets("TRAINING DUE").Select
    End Sub

    Sub TCSTRAININSGDUE()
    Worksheets("TCS TRAINING DUE").Select
    End Sub

    Sub CITITRAININSGDUE()
    Worksheets("CITI TRAINING DUE").Select
    End Sub

    Sub TRAININGDUE2()
    Worksheets("TRAINING DUE").Select
    End Sub

    Sub TRAININGDUE4()
    Worksheets("TRAINING DUE").Select
    End Sub



    3. Macros for for sending training details:


    'Sheets("Sheet2").Select
    End Sub
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Is this macros are correct ?

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    12-26-2013
    Location
    Kolkata
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Is this macros are correct ?

    Okay. Thanks

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Is this macros are correct ?

    Hey Ram,

    You said ok but you haven't put the code tags around your post # 1 - please do that

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Is this macros are correct ?

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. new to macros need to correct error
    By ellyb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2013, 08:11 AM
  2. Highlighting due dates - (updated w/ formula but w/o the correct macros! help)
    By muffins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2012, 05:19 AM
  3. [SOLVED] Correct way to write VBA Macros
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2012, 12:04 PM
  4. Renaming .dat to .csv, run through macros and save in correct folder
    By holly66 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-20-2010, 04:55 PM
  5. Correct coding entry of VBA macros in Excel worksheet
    By Jack R in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-30-2005, 07:10 AM

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