Posts by darkorder

    You will need some way to identify how much of "B1" you want to check for.

    Dim vCharacter
    Tit = Range("B1").Value
    vCharacter = Range("A1").Value
    Tit = Left(Tit, vCharacter)

    'vCharacter = 12' will display your example.

    However, if you are trying to use a single cell, to search multiple strings using a special character like "/" to split them, that it going to be tough since there are so many possibilities. You would have an easier time of making seperate cells, or a range, and searching for these using Carim's code with a slight adjustment to check for multiple Tits.

    Tit1 = "Poste Italiane"
    Tit2 = "Poste Italiaea"

    From Alan's example you would need to add the intersect range to specify where the action should occur.

    I started converting my data validation, dynamically pulled from SQL, from lists to arrays. This works very well unless the SQL data returned contains a comma. When I use the following code it populates the data validation with only the LastName. My workaround has been to list the names as "FirstName LastName" but is there some code that will allow populating an array with "LastName, FirstName" EG: with a list of values that contain a comma?

    Re: Create a report using vba

    Based on what was on your report page I have put this together.

    NOTE: You will need to remove everything below row 44, includeing the text and pivot chart, or it will run into a problem.

    Re: Pop up message and go to link

    Try this.

    Re: Create a report using vba

    You want a report that looks like a pivot table but is not a pivot table? Why not just run the macro recorder, select the data you want, then create a new pivot table from the data you want? Then just view the macro for the code you need to reproduce this for other data.

    However, if you still do not want to use a pivot table when you will need to simply run a For Next loop, checking each column and copying the information where you want it. There are a number of posts what give examples on this.

    Re: Pop up message and go to link

    I am not able to reproduce this with your example workbook using the provided code. Can you attach the updated workbook, as an xlsm file, so I can see where you have placed the code?

    Re: Pop up message and go to link

    Modify as needed.

    Re: VBA Date fix

    Maybe something like this?

    Re: VBA Coding to send a common email to different email addresses based on cell valu

    I made some adjustments to get this to work. The major problem was that in the middle of sending an email, from one workbook, the code was creating/updating a 2nd workbook. I suggest using your own email to test this as I accidentally sent an email to craig.pointon thinking this was a "fake" email.

    Also, make sure to bind your button to the appropriate Sub

    Re: VBA Code Keeps Changing Bar Graphs To Line Graphs

    I would set the ChartType value for each chart in the series.

    Here is something that I use to be able to easily change chart type.

    Re: VBA Coding to send a common email to different email addresses based on cell valu

    I took a quick look. I would recommend adding a variable, based on the selection, for the email address to be used.

    For the info to include in the email body you will need to select the data you want. And then wrap this in your email.

    Re: Copy checkboxes and data from one sheet to another

    1) On your VBA window go to Tools/References and check Microsoft ActiveX Data Objects 2.7 library. Save, close, and reopen your workbook.

    2) All of your checkboxes, in the attached file, are form checkboxes. They need to be ActiveX checkboxes. This will allow you to trigger specific code when the checkbox is checked/unchecked. Form checkboxes are just graphical items (if there is a way to generate VBA code via these form controls it is not something I am familiar with). To insert an ActiveX checkbox go to the Developer tab and select the Insert button. Select the checkbox from the ActiveX section (bottom).

    3) When you insert the checkboxes make sure to name them so its easy to identify them. EG: If you have a problem with Checkbox10528 it can be difficult to identify vs Dial Soap_Orange. Once you have the checkboxes created double click one and it will open the action, for that checkbox, in the VBA window. Copy CheckBox_Action into this to trigger the script. You will need to update the code with each of the checkbox names so it can run through the list.

    Re: Copy checkboxes and data from one sheet to another

    Here is a quick example that should get your started. Please note that all of the checkboxes will need to be ActiveX checkboxes and not form checkboxes. This code is set to check every checkbox when a action is taken on any checkboxes. This can be helpful if you want to quickly update all the text but not have to uncheck/check every checkbox.