Posts by cramirez06

    Re: [Shift] Arguments for Range.Delete()

    Sure; I want to take an ActiveCell and delete it if its value is "-", shifting cells up whenever I do so. The final code should look like this.

    Do While ActiveCell.Value > 0
         If ActiveCell.Value = "-" Then
              'To Shift Cells up in that row...
              'Do something else...
         End If
         ActiveCell.Offset(1, 0).Select

    Re: one time use vba

    Can you expand on exactly what you need? What do you mean deletes the message, like automatically clicks "OK"? What then would be the point of the program?

    Re: Regular Expressions in VBA

    Thanks Richie, that site really helped. I have another question though: I have only just started learning regex so it might be a stupid one, but... Do you know how I could turn a string into a regular expression pattern? More exactly, if I have a string
    "6-methyl-5-hepten-2-one", how can I turn it into a regex withing VBA code to search just for "5-hepten-2-one" or something similar? Because I will have to do so for many such names.

    Re: Intra-workbook List Comparison


    Thanks for responding to my post. I tried your find function, however, and I get a message:

    Error '9':

    Subscript out of range

    which highlights the IF method inside the function. Any idea why this might be?
    If you need a copy of the workbook, I would be glad to send it to you.

    Re: USB printer in macro

    Why don't you make a textbox to select the current port before the macro code is carried out? Then you could implement the selection in the code


    I have a chemical compounds database with 555 compounds in it, saved as Macros.xls in a worksheet named List . I need to make a macro that checks a new list in another workbook and highlights those compounds it found in the database.
    I have started a tentative code structure and almost got it working, except for the Find method inside the Find function. Can somebody help me?

    I am trying to search the database for each string in the new list (which is vertical in the A column of a new sheet), and am considering any range returned by the Find() function with value > 0 to be a positive match. Apart from that, however, I am in dire need for help.

    Can somebody come to my rescue?

    PS. Both the database and the new workbook are in the same folder.