Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re : Excel Control-"C" to Copy an ActiveCell
It appears that the following VBA statement,
Application.SendKeys ("^C") does not copy the ActiveCell (as per intention), but why ? Please share your experience. Regards. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re : Excel Control-"C" to Copy an ActiveCell
It does work but it is dependant on exactly what you are doing. For example
if you create a forms button on a worksheet and then attach the following code to the button then when you click the button, it will copy A1. Sub test() Range("A1").Select Application.SendKeys ("^c") End Sub However, if you are in the VBA editor and highlight (select) the line Range("A1").Select and then run the code from the VBA editor and then move the cursor to a blank area of the editor and paste you will see that it has copied the selected text in the VBA editor. Out of curiousity why would you want to use Senkeys to copy? -- Regards, OssieMac " wrote: It appears that the following VBA statement, Application.SendKeys ("^C") does not copy the ActiveCell (as per intention), but why ? Please share your experience. Regards. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re : Excel Control-"C" to Copy an ActiveCell
OssieMac, Esq.,
Thank you for replying to my query. Could have used, Range("A1").Copy ...... However, upon pasting onto an external application such as MS-Word, the cell borders of A1 are copied along thereof. The borders are not wanted in this case. SendKeys are intended to imitate the menial tasks of highlighting a cell's contents Control-C (to copy) ...... and then, switching (via the Task-Bar of Windows) to MS-Word, placing the cursor where it should be, press keys Control-V, to paste thereof. Regards. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Excel "Move or Copy" and "Delete" sheet functions | Excel Worksheet Functions | |||
Replace(ActiveCell.Formula, "Round(","") not working as expected | Excel Programming | |||
Scroll Bar missing "Control" tab in "Format Properties" dialog box | Excel Discussion (Misc queries) |