So i have a button that copies data from cell
A5:K5, and pastes it in Sheet2 of my workbook.
The data is ordered like this
------
------
------ button1
------
------
------ button2
------
------
------ buttonX
I have like 40 buttons attached to 4 rows each. And in that group of rows, i have some cells with an IF= formula, and some minor coding.
The problem is: If i press button 3,4,17,29 before i press every other button before that. I get an reference code fail at the cell.
If i press the buttons in order. Like 1,2,3,4,5,6,7 - it appears smoothly.
Does anybody have a clue on how to fix it?
More info: The button copies data from for example A5:K5 and pastes it into the next blank row of sheet2. But i want to be able to press button 2 before i press button1, without getting an error in my =IF cell.
If i press the 40 buttons in a row, and then starts to mix up the button pressing. It appears smoothly.
Please, help me:D Thanks:D
btw, here is the buttoncode, which i got from a person in here:
Private Sub CommandButton1_Click()
Dim x As Long
x = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Sheet1").Range("A1:J3").Copy
Sheets("Sheet2").Range("A" & x + 1).PasteSpecial
Sheets("sheet2").Range("k" & x + 1).Value = Now()
End Sub
Bookmarks