1 Attachment(s)
Automatically Converting Value to negative
Hi VBA Gurus,
I've been playing around with this for a little while now and getting a bitfrustrated. I've created a code which works well by pressing the commandbutton to convert a positive number in a specific range of cells to a negativenumber. I would like to take it to the next step by indicating that assoon as there is an entry made in a specific cell in a range of cells of apositive number to automatically change it to negative. If a numberwithin that range of cells is already a negative, to leave it alone. Ihope you understand what I mean. I have included a worksheet as anexample of my data.
As you can see from the worksheet, I have a script in Module1 which I use incollaboration with a command button on top of the worksheet. I also have a the same script under sheet1where I use “Private Sub Worksheet_Change(ByVal Rng As Range)” to try to havethe script automatically change positive values to negative values. When I enter numbers, the first number Ienter works as it should but as soon as I enter a second number it goes into aloop and I have to ctrl ► breakout of it.
Can anyone help with this dilemma?
Thank you