Ok thank's!
Posts by Mase
-
-
-
yes.
All other macros work properly. The script is also run if a cell value is changed.
XL2K? What's that? :stare: -
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;
Mase! -
Wow!
Thank's! They said to me that it was not possible using attributes, so I didn't take a closer look.
Now it's just how I desired -
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;
Mase! -
It seems it wasn't as easy as I thought. Finally I found this script which detects if a row is inserted or deleted:
Code
Display MorePrivate Sub Worksheet_Change(ByVal Target As Range) Static lastValue As Variant Static lastRow As Long Dim lastVal As Variant Dim lastRw As Long lastRw = Cells(65536, 1).End(xlUp).Row lastVal = Cells(lastRw, 1).Value If lastRw = lastRow Then lastValue = lastVal Exit Sub Else If lastVal = lastValue Then Worksheets("Hoja2").Range("A1").Value = 1 MsgBox "You aren't permitted to insert or delete rows within the dynamic range. Please undo any row insertions!" Application.EnableEvents = False Application.Undo Application.EnableEvents = True Else lastValue = lastVal lastRow = lastRw End If End If End Sub
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...CodeDim 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: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:
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:
Code[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 programI 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