Does anyone have any idea why I am not able to get this macro to copy cell data?
Here is the last part of the code:
I am not very good at VBA, but this is what I am trying to do here. I put this piece of code at the end of a macro I am using regularly to cut a couple manual steps out of my work. The code needs to go down one cell (SendKeys "~"), the it runs a another macro shortcut (SendKeys "^{k}"), then it calls the rest that moves the selected cell 3 cells to the right, then finally it is supposed to copy that cells data so I can manually paste it elsewhere. This works for all the steps except the final step of copying the cell data. I tired Selection.copy and I tried SendKeys "^{c}". Neither work for me.
Like I said I am not good with vba so I am sure this a convoluted method and there is a better way. This works for every step except the last step. If I comment out the last step, the copy, it goes right to the cell I need the data from. If I leave the copy step in, it doesnt get past the first step of pressing the enter key. Thanks for any suggestions.
Here is the last part of the code:
Code:
SendKeys "~"
'presses enter to move down one cell
SendKeys "^{k}"
'runs macro shortcut
Call Copy_Location
End Sub
Sub Copy_Location()
'moves right 3 cells
Application.SendKeys "{TAB}"
Application.SendKeys "{TAB}"
Application.SendKeys "{TAB}"
Selection.Copy
'SendKeys "^{c}"
End Sub
I am not very good at VBA, but this is what I am trying to do here. I put this piece of code at the end of a macro I am using regularly to cut a couple manual steps out of my work. The code needs to go down one cell (SendKeys "~"), the it runs a another macro shortcut (SendKeys "^{k}"), then it calls the rest that moves the selected cell 3 cells to the right, then finally it is supposed to copy that cells data so I can manually paste it elsewhere. This works for all the steps except the final step of copying the cell data. I tired Selection.copy and I tried SendKeys "^{c}". Neither work for me.
Like I said I am not good with vba so I am sure this a convoluted method and there is a better way. This works for every step except the last step. If I comment out the last step, the copy, it goes right to the cell I need the data from. If I leave the copy step in, it doesnt get past the first step of pressing the enter key. Thanks for any suggestions.