• We are receiving reports of members using the private messaging service (Conversations) in ways that break the forum rules:
    • Do not invite another member to take the question off the forum (i.e. do not suggest that they post to a different forum, do not suggest that they email or private message you the problem, do not simply post a link to another forum, unless it is to a specific, relevant, thread). This applies equally to members asking or answering questions.
    • Soliciting business for yourself is not permitted. This is an all volunteer board, so offering solutions in exchange for compensation is not permitted. Likewise, members seeking solutions must not offer compensation for them. If you have an urgent need, check the Consulting Services page.
    Please help us out by clicking the Report link on any messages you receive that violate these rules. Thank you
  • If you would like to post, please check out the MrExcel Message Board FAQ and click here to register.
    If you forgot your password, you can reset your password.


  1. C

    VBA Outlook Run Excel Macro When Received email in Outlook Subfolder

    Hi, I want to trigger excel macro TEST12.xlsm when received en email with subject title "Test", it work when the mail arrived in inbox folder, but not in subfolder. Can anyone enlighten me or point me to the correct sub folder path? The subfolder name is "Biz Ops Report" and I am using below...
  2. D

    VBA Userform with inactive workbook

    Hello all, I have an Userform which starts up when Workbook is open, and the workbook gets minimized. Userform is show modeless so other open workbooks could be handled Private Sub Workbook_Open()ActiveWindow.WindowState = xlMinimized Workbooks("New BOM Maker Userform.xlsm").Activate...
  3. A

    multiple worksheet changes

    Hi I have a worksheet change in a sheet but need to a second one. I know you can't have two changes in a sheet so is there a way I could combine the two changes below? Private Sub worksheet_change(ByVal target As Range) If target.Column <> 2 Ortarget.Cells.Count > 1 Then Exit Sub...
  4. Y

    Sort out data using autofilter

    Hi experts. I currently have the following code (see below) in a worksheet I use at work. I would like to streamline the process to filter data by removing the command button to show all data and include "all" in the combobox. When "all" is selected in the combobox it should filter/show all...
  5. D

    Making a pop-up form work from a merged cell

    Hi, I've used the following code in another workbook to open a calander pop up when I choose a particular cell and then once i've selected the date I want to select another cell. I'm trying to use the same code on another workbook however the cell I want to use to start the pop up is merged...
  6. S

    Macro to filter data base on combobox value

    Hello, Would it be possible to have your help to change the below macro so it filters the data I have in worksheet "Data" in worksheet "DataFilter" based on combobox5 "Open", "Closed", "All". These three criteria are in column M in row 27 i my worksheet data. Private Sub...
  7. S

    Macro to filter data base on combobox value

    Hello, Would it be possible to have your help to change the below macro so it filters the data I have in worksheet "Data" in worksheet "DataFilter" based on combobox5 "Open", "Closed", "All". These three criteria are in column M in row 27 i my worksheet data. Private Sub...
  8. T

    Initialising a class

    This code: <code style="color: rgb(0, 96, 0);">Option Explicit</code> <code style="color: rgb(0, 96, 0);">Private pKey As Long</code> <code style="color: rgb(0, 96, 0);">Private pName As String</code> <code style="color: rgb(0, 96, 0);">Private pChildren As Collection</code> <code...
  9. A

    A further 32 to 64 bit conversion problem

    Hi, I'm using this really cool function in 32 bit Excel. It says I should not alter it.. but even if I try by just adding ptrsafe I can't get it to work. Is there a another similar routine I could use in 64 bit environment? Any help appreciated. Here is the full function. 'This code was...
  10. P

    VBA Private Sub; posting question...

    Good Afternoon, I have a Private Sub that I have posted onto Sheet1 (Sheet1) that works great on its tab. Now, if I wanted to have this Private Sub to work on every sheet of the workbook, I thought I would post it onto ThisWorkbook but it does not work upon every sheet of the workbook. Do I...
  11. A

    Stop picture flashing as resized.

    I didn't write this and can't remember where it came from. Consists of a Form and a class module. An image file is loaded via the Forms Picture property, and a "handle" on the Form lets you drag the picture to any size. It's brilliant. Except as you drag the picture it flashes and looks awful...
  12. K

    Determine if ActiveX ComboBox is deselected

    I have a Private Sub that runs if an ActiveX ComboBox is CHANGED. The problem is, every time you type a letter in the open field (if a selection is not available) the code fires and slows down your typing. Is there a way to determine if the text field of the combobox is deselected and if so...
  13. D

    How to choose a specific cell when a form closes

    Hi all, I'm quite new here and new to vba. I have a worksheet that opens a pop up calendar when I click on a certain cell. When I then click on a date on that pop up it puts the date into that particular cell and then the calendar closes. This is all good and working. Is there a way that when...
  14. E

    VBA - If statement, Clear contents, add data

    I am having multiple problems: I created an if statement that first clears out any pre-existing content and then adds new data to the cells from a Userform. The Userform has 5 tabs within a Multipage and when I set the first page as active I want the data to be exported into a BOM. I have a...
  15. B

    Saving updated data record on current line vs saving new record

    Hello, Current userform has a save button, wich adds data to sheet 1, Added Search Button to find saved data for editing. If I use save button for Updated information it adds the information like new data at the bottom while old version still in the list. I added update button to use only when...
  16. A

    Code efficiency

    I have 10 command buttons named cbTC#. The code below works good, however Is there a better way to code this without having to write the code below 10x (1 for each command button)? Thanks Private Sub cbTC1_Click()If Len(tbx800) > 0 Then If MsgBox("Do you want to delete data?", vbYesNo) =...
  17. R

    Textbox in User-form displaying three digits (first digit is a 0)

    Is it possible to get a text box in my user-form to display a three digit number when the first digit is 0? The text box name is T07. Code: Option ExplicitDim lSearchCol As Long, lLastRow As Long, l As Long, lFound As Long Dim SearchRange As Range, FoundCells As Range, FoundCell As Range Dim...
  18. L

    Macro for recalculation of range of cells in active sheet

    Hi guys, I need to recalculate range of cells with RANDBETWEEN formula. I assign the below macro to command button where I substitute the "Range" with the range I need to recalculate only "D5:S19" but it doesn't work. Private Sub CommandButton1_Click() If TypeName(Selection) = "Range" Then...
  19. M

    Modify VBA Code To Allow Copying of Pivot Table To New Workbook

    The following VBA Code is not allowing for user to copy pivot table from existing workbook to new workbook. Is it possible to edit code to allow this while maintaining the original function of the code? Private Sub Workbook_NewSheet(ByVal Sh As Object) Call DrillDownDefault End Sub...
  20. K

    Object Required error with ActiveX Combobox

    Why do codes A & B below give me an Object Required (424) error (A is assigned to a button, B obviously fires on WB open) but C works without any issues?: A: ComboBox1.Value = "" ComboBox2.Value = "" B: Private Sub Workbook_Open() Dim ROWC As Integer ROWC = Worksheets("JOB...

Some videos you may like

This Week's Hot Topics