Posts by daniel.c

    Re: Use Check Boxs To Copy Rows To Word Doc


    The macro "CopyToWord" of the workbook copies the six first cells of every row that has a checkbox set to "on" to the word document "Use Check Boxs To Copy Rows To Word Doc.doc" (see attached file). Each row is copied to the word doc table. the doc has a bookmark to position the data. Here is the macro :

    Re: Scatter Plot With Many Series


    Have a look at the attached file. The code triggered by the button is :

    Re: Concatenate Vertical Cells


    Select the range of cells to concatenate. Execute the following macro.
    The result will be written in the first cell :

    Code
    Sub conc()
        Dim c As Range, Str As String
        For Each c In Selection
            Str = Str & c
        Next c
        Selection(1, 1) = Str
    End Sub

    Re: Choose 2 Columns & Calculate Difference


    Have a look at the attached file. Press the command button. The userform prompts you to choose the first series, then the second. The chart is then updated.
    In a module, you have the following code :

    Code
    Public Series1 As String, Series2 As String

    .
    The code of the command button shows :


    the code of the userform is :


    If it's what you want, i'll comment the code.

    Re: Email File Via Groupwise


    Be careful with "Name" as it is a VBA keyword.
    Can you add the code :

    Code
    MsgBox Name


    before :

    Code
    Call Email_Via_Groupwise("EXXXX", _


    and post the content of the variable ?

    Re: Copy Column Data To A New Sheet


    The following macro creates a new sheet ("NewSheet") where it lists the required data :


    Regards.
    Daniel

    Re: Export Incoming Email Data


    The first code must be put in outlook VBE. Double-click on "ThisOutlookSession" and paste the following code :


    This macro intercepts the incoming messages, calls the macro contained in the "test.xls" workbook which fills the corresponding fields. You'll find this workbook attached. The code of the workbook is :

    Code
    Sub XLMacro(Tablo, Sender)
        Dim myRow As Long
        myRow = ActiveSheet.[A65000].End(xlUp).Row + 1
        Cells(myRow, 1) = Tablo(0)
        Cells(myRow, 2) = Tablo(1)
        Cells(myRow, 3) = Tablo(2)
        Cells(myRow, 4) = Sender
    End Sub


    I don't understand most of the outlook macro. I just pick it from a Microsoft Web page and modified it. I can comment my part.
    Regards.
    Daniel

    Re: Return Unique Value From Column In Seperate Worksheet?


    Try this code to populate the combobox :

    Code
    Dim c As Range, Coll As New Collection
        On Error Resume Next
        For Each c In Sheets("Sheet2").[A2:A7]
            Coll.Add c.Value, c.Value
        Next c
        On Error GoTo 0
        For Each Item In Coll
            Sheets("Sheet1").ComboBox1.AddItem Item
        Next Item


    Notice that I am working with Excel 2007 so there might be differences.
    However the linked cell should not be affected. Can you post your sample file.
    Regards.
    Daniel

    Re: Adding More Than One Recipient On Varecipiants


    Then maybe you will be forgiven for not to have posted in the right forum. If you have several recipients, vaRecipient has to be an array variable. Use that piece of code to populate it :

    Code
    Dim Rec As String, vaRecipient() As String
        Rec = 1
        ReDim vaRecipient(0)
        Do While Rec <> ""
            Rec = InputBox("Enter recipient, or press cancel key")
            If Rec <> "" Then
                vaRecipient(UBound(vaRecipient)) = Rec
                ReDim Preserve vaRecipient(UBound(vaRecipient) + 1)
            End If
         Loop


    Regards.
    Daniel

    Re: Find Dates Over Multiple Sheets


    I don't know why the error is not trapped by

    Code
    On Error GoTo ErrorHandler


    Use this code :


    Regards.
    Daniel