Posts by Luke M

    Re: Dealing with Captcha in VBA

    If the website has a captcha, usually that's an effort to stop automated processes from using their site. Many websites do that actually, as part of their Terms and Conditions. As such, I would first double check to make sure you're not breaking any rules or laws. It's probably low key, but just want to state for the record.

    For the code, can you just add in a basic wait, something like

    MsgBox ""You have 15 seconds to enter the code!"
    Application.Wait Now + TimeValue("0:00:15")
    'User should fill in captca during this time
    'Continue with code

    Re: Pause a Macro to allow user to Name a Range

    Ok. We cna just change the cell's value then

    Re: Deleting rows by value in a given column or selection

    Oops, I forgot a line. In the loop, need to tell code to find the next cell.

    Re: vlookup in vba

    What do you mean by "set"? Is the ComboBox linked to this cell, and so we could grab the value just from the cell (rather than the ComboBox object)?

    Re: vlookup in vba

    Ok, I'm going to guess that that table is on a worksheet called "Sheet1", and that col R is what's being fed to the ComboBox, and that you want to VLOOKUP info from col S. I'm not sure what C1 cell is, as you've said you're using an ActiveX dropdown. Is that still true, or is it a Data Validation dropdown?

    Re: Deleting rows by value in a given column or selection

    Hi TOOMC, and welcome to the forum! :)

    Try running the MainCode macro from here. Will run through and delete rows contain whole matches.

    Re: vlookup in vba

    Can you elaborate, what didn't work? Like I said, I was having to guess. I've not idea what ranges or values that you're dealing with. If it's not working, please post the code that you used, and explain what happened (code errors out, bad results, unexpected results, etc.)

    Re: Excel "=Month" Settings

    XL let's you assign custom names to any cell(s) you want. Someone has given the name "month" to the cell B1 on the first sheet (IMO, don't use names that are the same as function, but side issue).

    Anyway, names are helpful in that instead of using a cell reference, you can just use the name. So, if you had a range with name "myChoice", then you could use it in a formula like

    =VLOOKUP(myChoice, B:C, 2, 0)

    instead of having to type

    =VLOOKUP(Sheet1!$B$1, B:C, 2, 0)

    That said, with that named range in place, whenever you put the name "month", you're creating a cell link to B1 of the first sheet. When the cell is empty, the cell value is 0. You see the same behavior when you have a blank cell of A1 and have another cell with formula

    the result is 0.

    Further reading:

    Re: Pause a Macro to allow user to Name a Range

    Hi morganprop, and welcome to the forum! :)

    Can you just prompt the user with an InputBox?

    Re: vlookup in vba

    I'm going to make a lot of guesses and assume this is using a activeX combo box on a sheet, not a user form. Some code like this, perhaps?

    Re: vlookup in vba

    Hi Acorn11, and welcome to the forum! :)

    I'm a little confused; the code you posted doesn't have a VLookup anywhere in it. Is it this block of code that you're having trouble with, or making a VLookup?

    Re: Loop Through Rows in Column and Add Subtotals at Each Empty Row

    Hi dashender7, and welcome to the forum! :)

    I've moved the thread for you. See if this code will work for you. It prompts for the column letter you want to place subtotals in. I'm assuming the data you are adding is constants, not formulas.

    Re: Number of Calendar Days between the first Start Date & the last End Date

    Could do this array:


    Remember to confirm using Ctrl+Shift+Enter, not just Enter. Side note, I'm not exactly sure where you data is, so may need to adjust range sizes. Just make sure all the ranges are the same size.