Hi all,
I am trying double click event.
Code is as follows:
Not getting there yet.Please Login or Register to view this content.
Any help please
Kind regards
Hi all,
I am trying double click event.
Code is as follows:
Not getting there yet.Please Login or Register to view this content.
Any help please
Kind regards
Sorry this should be (14) and not (17) in the red coloured font in second If statement
Please Login or Register to view this content.
Is there a problem with the code?
If posting code please use code tags, see here.
Hi Norie,
Yes indeed.
It goes to debug and at times the row is deleted but does not go anywhere. I did search through other sheets also.
Something strange that I cant understand.
Kind regards
Try adding Cancel = True to the code to stop Excel entering edit mode, which is normally what happens when you click a cell.
Please Login or Register to view this content.
Hi Norie,
Thanks again.
Apology. Both if statements are working in isolation, but when combined the first If 'Not' does not work.
I will try again.
Kind regards
Not sure what you mean, there is only one If with 'Not'.
What in words is the logic you want to apply?
Hi Norie,
What I mean is the line in the code:
This is causing an issue.Please Login or Register to view this content.
with previous suggestion it goes as far as populating current date and time.
Thanks
Kind regards
What issue is it causing?
Its really amazing.
Now the previously working code also has stopped working.
It does populate the date & time
It also deletes the row
But can not say for sure where the row is pasted??.
I am now re-doing the entire work book.
Thanks
The data is being pasted in either Sheets(5) or Sheets(9), it's going to the next empty row of the relevant sheet.
This code is closer to the original code.
That code will put the date/time in a cell when double clicked if the cell is in column Q.Please Login or Register to view this content.
If it's a cell in column N that's been double clicked and the value in the cell is 'Not' then the entire row the of the double-clicked cell will be copied to the next empty row on Sheets(9).
If a cell is double clicked anywhere else on the sheet then the row of the double clicked cell is copied to the next empty row on Sheets(5), then the row is deleted.
Is that what you want the code to do?
Hi Norie,
Really thanks. Still the same. Apology. Cant find the pasted row anywhere in the workbook sheet 5 or 9 . The sheets 5 & 9 are empty.
Actually I have realised that in this double click event, there is a change event.
What if I separate them and re-write.
double click will populate date & time.
Change event will cut & paste to appropriate sheet depending upon what is there in N:N
I do appreciate you are helping me during your valuable time
Kind regards
Kind regards
If there is a change event then it could be affecting the double-click code, and vice versa.
It could even be that the copy isn't happening.
That's true.
Let me write both codes and I will post them for your expert advice.
Great learning for me.
Thanks
Hi Norie,
I have modified the code and made it in two parts
1- populate date & time by double clicking- works fine
2- Change event- when date & time is populated then change event kicks in and does the action of copying and pasting.
The second code is as follows:
Thanks for your help again NoriePlease Login or Register to view this content.
Kind regards
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks