English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

in visual basic, let's say
when cellx = 0, then celly is also 0 (copied from cell x)
when cellx turn to 3(>0) , celly also turn to 3 (also copied from cellx)
but when cellx turn back to 0 or less than 0
let's say cellx = 0 (turning back again from 3)
celly remain 3 (not copied from cellx, just remained as it is)
so, when cellx = 0 , celly = 3 (celly must remain >0)

eg. cellx = 0, then celly = 0 (first step)
cellx = 3, then celly = 3 (second step) (cellx turn to >0, and celly follow suit)
cellx = 0, then celly = 3 (third step) (although cellx turn back to 0, celly must remain at 3 (>0) )
hope it is clear what i want to know. please find me the answer.

2006-07-27 04:01:36 · 3 answers · asked by Anonymous in Computers & Internet Software

3 answers

OK try this.

in cell x text change function. copy the value to cell y.

2006-07-27 04:06:22 · answer #1 · answered by Anonymous · 0 0

'Create an array for your cells to flag changes'

Dim MyArray(20,20) as boolean 'Width and height of grid'

'Set Array to false'

Dim X as Long
Dim Y as Long
For X = 1 to 20
For Y = 1 to 20
MyArray(X,Y) = False
Next
Next

'Do this when changes occur'
'This example will
If MyArray(Cellx_x, Cellx_y) = False Then
Cellx = NewValue
MyArray(Cellx_x, Cellx_y) = True
Else
If NewValue <> 0 Then
'If the newvalue is not equal to zero then set'
'You can replace this with another condition if you like'
Cellx = NewValue
End If
End If

2006-07-27 11:15:59 · answer #2 · answered by JeffE 6 · 0 0

Sorry i don't know (good luck)

2006-07-27 11:06:36 · answer #3 · answered by green_maths_scout 2 · 0 0

fedest.com, questions and answers