Hey,
I was wondering if you could use sendkeys in an if statement combination.
I ve got data in excel that I have to paste in another programme.
I adjusted my macro in such a way that it copies automatically a value that I paste in the programme (I click ctrl +V). When I press ctrl + v I want another value in my sheet to be copied automatically so that I can paste it in another cell in the programme (by clicking ctrl + v again).
The problem is that when I press ctrl + v by the time excel is inactive therefore I have to use sendkeys combination (ctrl + v).
It write sth like
If sendkeys "^v", true then
Cells..copy
However, it doesnt allow me to put sendkeys in if statement as a condition. It says - compile error expected: then or go to
Can you help me out?
Thanks
I was wondering if you could use sendkeys in an if statement combination.
I ve got data in excel that I have to paste in another programme.
I adjusted my macro in such a way that it copies automatically a value that I paste in the programme (I click ctrl +V). When I press ctrl + v I want another value in my sheet to be copied automatically so that I can paste it in another cell in the programme (by clicking ctrl + v again).
The problem is that when I press ctrl + v by the time excel is inactive therefore I have to use sendkeys combination (ctrl + v).
It write sth like
If sendkeys "^v", true then
Cells..copy
However, it doesnt allow me to put sendkeys in if statement as a condition. It says - compile error expected: then or go to
Can you help me out?
Thanks