Well i guess ill start with what code i have and work from there...
zNum = 0
x2 = 0
y2 = 0
z2 = 0
Do
Do
Do
myArray(x2, y2, z2) = zNum
If zNum = txtNum.Text Then
GoTo subEnd
End If
z2 = z2 + 1
zNum = zNum +...
oh sorry to answer your questions
the rows would have been populated manually but your last reply with code gave me an idea on a different way... originally it would have been manual entry and user error would have been the cause for duplication.
thing is its not me using this spreadsheet in...
actually you were very close with what you posted earlier. the only difference would be that it would find a duplicate value in the column and replace it with the next logical number in the column eg. the first column would represent before the search and the second column after...
51 51...
thing is i just recently became interested in vba so i dont have much to build on and honestly didnt even know where to start. obviously my programming skills are next to none hence my handle. in any case thankyou for the replies and in the future ill try a little more extensive research before...
ok i have 1 column say "A" that is about 50 rows long and each cell has to be a unique number say 1 to 50.
if there is a repeat number somewhere in the column how can i, using a button, search down repeats and make the value the next largest number in the column (eg. 51) then keep searching...
Private Sub CommandButton1_Click()
Static x As Integer
x = x + 1
If x > 3 Then
MsgBox "you cannot click me no more", vbInformation, "test"
CommandButton1.Enabled = False
End
End If
MsgBox "You clicked me " & x & " times.", vbInformation, "Test"
End Sub
what i need is to have the button (forms) count the number of times it has been pressed and only allow it to be pressed a certain number of times like 5 times for instance. then ill have it spit out a msgbox or something. i tried a couple things but im pretty new to VBA and didnt produce the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.