Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste, clear and ignore contents and... automatically!
Hello!
I would like to know if Excel is able to do the following task: - I have a sheet with an almost entire column formatted as date. Would it be possible that, arriving to those cells with the tab key, the content of the clipboard were pasted automatically? Of course, if the cell is yet filled, it wouldn't change. Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste, clear and ignore contents and... automatically!
Sorry, I forgot to say that when Excel is opened, there is a prepared
content in the Clipboard ready to be pasted (via a script). That content is what I want to be automatically inserted when those cells are selected... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste, clear and ignore contents and... automatically!
See the responses to the thread "Convert text from clipboard and put in
cells..." in this NG. NickHK "Alok" wrote in message ... Hi Pepe, In my opinion Excel cannot just Paste. In other words you have to use Excel to Copy and then having done that, Excel can paste from clipboardd. (Others may contradict me on this) If you want to copy say what is in cell A1 and the column in which you want this functionalility is Column A then the following will do the job. (the copy will take place whether you come to the column using a tab or using a mouse or arrow keys) Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column = 1 And Target.Row 1 Then If Target.Cells(1).Value = "" Then Worksheets("Sheet1").Range("A1").Copy _ Destination:=Target.Cells(1) End If End If End Sub "Pepe (Madrid)" wrote: Hello! I would like to know if Excel is able to do the following task: - I have a sheet with an almost entire column formatted as date. Would it be possible that, arriving to those cells with the tab key, the content of the clipboard were pasted automatically? Of course, if the cell is yet filled, it wouldn't change. Thanks in advance. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste, clear and ignore contents and... automatically!
Hello again! Thanks to your base code, I've been able to modify it and to
make it to work... Thanks again!!! -------------------------------------------------------------------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) If ActiveCell.NumberFormat = "dd-mm-yy" Then If ActiveCell.Value = "" Then ActiveCell.PasteSpecial End If End If End Sub -------------------------------------------------------------------------- |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste, clear and ignore contents and... automatically!
Thanks for your interest... you will see in the above post I've got it...
thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to clear range contents when cell contents are changed by us | Excel Programming | |||
Clear contents | Excel Programming | |||
Clear contents | Excel Programming | |||
Clear contents if x is not in the row | Excel Programming | |||
Type into one cell and automatically clear contents in another cell | Excel Programming |