Posts by Mase

    I want a script to execute when a row is inserted or deleted. I'm using Worksheet_change in my computer (Office XP pro) and it works fine, but on other computers (Excel 2000) it seems that inserting/deleting rows isn't considerated as a worksheet change.
    Is it possible?
    If so, how could I get around this?
    Thank's in advanec;

    I made a UserForm in which the user can write what he wants, but I only achieved to insert a big TextBox, which has several limitations. What I'm seeking is a textarea box (like this one where I'm writing right now). As far as I've seen in MVB Help there is no similar control, but I've heard something about Memo.
    Do you know anything what that Memo is?

    thank's in advance;

    It seems it wasn't as easy as I thought. Finally I found this script which detects if a row is inserted or deleted:

    Thank's anyway ;)

    I'm using Worksheet_Change in my Worksheet to react to the changes made by the user, but how do I know if the user just inserted a new row?
    Or is there any on_row_change event or something like that?

    Ok, first of all... I'm sorry wasting (?) your time with such an elementary question, but I really don't find how to do this:
    It's aboaut using reg expressions...

    Dim MyString as string
    MyString="Blah Blah"
    If MyString<> [COLOR=YellowGreen]*€[/COLOR] Then
        MsgBox (MyString & "doesn't end with €")
    End if

    My question is how do I make the program read the *€ as a regular expression?
    Thank's very much in advance :thanx:

    Ok, an example...
    Let's say I have a table like this:

    [B]Product         Shop1         Shop2         Shop3[/B]
    Something       19.50€        18.00€       23.99€
    Otherthing       4.99€         6.50€        4.50€

    I want to make something like a shopping list with this. If I want to buy 3 units of 'Something' at 'Shop2' and 1 of 'Otherthing' at 'Shop3' I will change the table to something like this:

    [B]Product         Shop1         Shop2         Shop3[/B]
    Something       19.50€        3             23.99€
    Otherthing       4.99€        6.50€         1

    But what if I change my mind? What if I now want to buy 3 units of 'Something' not to 'Shop2', but to 'Shop1'? I want to just have to write '3' in the 'Shop1'/'Something' cell and the original price of 'Shop2' should appear automatically when the value changes:

    [B]Product         Shop1         Shop2         Shop3[/B]
    Something       [COLOR=YellowGreen]3[/COLOR]            [COLOR=SandyBrown]18.00€[/COLOR]         23.99€
    Otherthing      4.99€         6.50€         1

    Written by me Changed by program

    I think it would be easy to make a macro which checks for the values of the other Shops cells and makes the necessary changes, but I need something which executes it. In JavaScript there's the OnChange command, so I thought of something similar in VBA.

    I hope I explained myself better now...

    It seems Worksheet_Change is what I'm looking for, but I'm open to suggestions... :)

    My first post! Let's see how it goes :p...
    I'm quite new on VBA althought I've been making some things in Excell. I have several columns which show the different prices a product (rows) is sold, but I also want those columns to be able to register values (quantity of units needed).
    I've thought of a funtion which checks the other price columns of the row. If the values are 1, 2, 3 etc they should be set back to the price if the selected cell has been changed to 1, 2 or 3...

    I'm more used to JavaScript, where there is the OnChange command. Has VBA something like that?
    Thank's very much in advance ;)