Posts by mrmmickle1

    Re: Copy specific sheets via file path to open workbook's specific sheets


    Try amending this portion of the code. You're getting an error because you close the workbook before all of the data is copied...you can't copy data out of the workbook if you close it before the task is complete.


    Re: Copy specific sheets via file path to open workbook's specific sheets


    What about trying something like this? You can incorporate more sheets if needed by amending the code a little bit. This should serve as a good base example.


    Re: Updating label of buttons on ribbon by VBA only


    For reference it may be important to know that I used the UI Editor in order to change the XML in addition to the VBA code. The change I made to the XML is as follows:< customUI onLoad="ribbonLoaded" xmlns="http://schemas.microsoft.com/office/2006/01/customui" >

    Re: Updating label of buttons on ribbon by VBA only


    What about trying something like this to change your labels?



    Re: Error message moving data


    Here's a similar option to cytop:


    Re: Allow user to choose which text file to import


    What line of code are you getting the error on?


    When you type the file name and path of the file you are choosing manually will the procedure run to completion? i.e. :



    Code
    ActiveWorkbook.Worksheets.Add 
        With ActiveSheet.QueryTables.Add(Connection:= _ 
            "TEXT;C:\Users\xxxxx\Documents\xxxxx\example.txt" _  , Destination:=Range("$A$1"))


    Does your file contain any non compatible characters?


    < , > , [ , ] , | , *

    Re: Upgrade existing macro to send data from multiple rows in one email


    Case issue has already been addressed in post # 2. You can also validate by using data validation if easier. :


    Code
    If LCase(myRange) = "yes" Then


    Try this event amendment:



    and this email amendment:


    Re: Command Button Combine Selected File Paths In ListBox To New Workbook Same Sheet


    This will list the listbox filenames in column A of a worksheet:



    This will add the filename Sheets:


    Re: Conditional Formatting with If Statements


    Maybe try something like this:


    Re: Upgrade existing macro to send data from multiple rows in one email


    Quote

    However your script does not include column F results at all (DM)



    You can change this portion of code to adjust the range:


    Quote

    If Yes but no name, the user should be prompted.


    This should be fixed with validation on the front end... You should use a change event to check the adjacent cell when yes is selected.


    Re: Upgrade existing macro to send data from multiple rows in one email


    Try this out... I used a sort as I previously referenced, some code from Ron De Bruin to convert your ranges into HTML and pretty much the same email code you had. I set the code to only display emails rather than send....


    If you want to suppress annoying email message you'll have to work with the CDO code (I've only used this on a few occasions so I'm no pro either... Took me several hours of debugging to get it to work for my purposes.)


    Probably a better way to go about it...but, this is what I came up with (Feel free to improve and post back)



    Re: Count Cell with specific color


    I've used a UDF to count cell with X Color before. Maybe this will be of use:

    Code
    Function CountCcolor(range_data As range, criteria As range) As Long
        Dim datax As range
        Dim xcolor As Long
    xcolor = criteria.Interior.ColorIndex
    For Each datax In range_data
        If datax.Interior.ColorIndex = xcolor Then
            CountCcolor = CountCcolor + 1
        End If
    Next datax
    End Function


    https://support.microsoft.com/en-us/kb/2815384

    Re: Upgrade existing macro to send data from multiple rows in one email


    You can avoid seeing the outlook pop up two different ways. The first is to get the end user to change their Outlook settings by going to:


    First:
    File > Options > Trust Center >Trust Center Settings > Macro Settings > Enable All Macros
    File > Options > Trust Center >Trust Center Settings > Programmatic Access > Never Warn Me About Suspicious Activity


    Second:


    Send email using CDO Method


    Here is an example:


    To avoid case sensitivity you can use code like this:


    Code
    LCase(MyRange)
    UCase(MyRange)


    THis will make everything lowercase or uppercase Once you convert a user's selection then you can use


    Code
    If LCase(myRange) = "yes" Then


    As far as sending multiple emails you can most likely sort the sheet data first by name and Notify.... Once you have sorted then you will be able to identify how many rows of data each person has.... then you can adjust the range accordingly. You could also use a simple Countif Variable to aid this comparsion ...