LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default XL97 - Log use of paste function in workbook

Those OnKey's work fine for me, no idea where the "macro 1" comes from. I
assume your Sub enterinlog() is in a normal module.

Even if you trap use of keyboard to paste, what about all the paste's on
various toolbars, have you disabled or substituted those with similar
captions looking icons on your own menus, in the right positions of course..

Why is paste such a problem, surely that's a normal operation. If user is
pasting over multiple cells that would be very easy to trap, if not allowed.

In passing, in your enterinlog routine there's no need to select or
activate, anything so your Log sheet could be hidden or xlVeryHidden.

Regards,
Peter T

"Kai Smith" wrote in message
. uk...
Sorry, forgot to include the code I already have...



Private Sub Workbook_Activate()

Application.OnKey "^v", "enterinlog"

Application.OnKey "+{INSERT}", "enterinlog"

Application.CellDragAndDrop = False

Application.OnDoubleClick = "Dummy"

End Sub



Private Sub Workbook_Deactivate()

Application.OnKey "^v"

Application.OnKey "+{INSERT}"

Application.CellDragAndDrop = True

Application.OnDoubleClick = ""

End Sub



Sub enterinlog()

Sheets("Log").Select

Rows("1:1").Select

Selection.Insert Shift:=xlDown

Range("A1").Select

ActiveCell.FormulaR1C1 = Application.UserName

Range("B1").Select

ActiveCell.FormulaR1C1 = DateTime.Now

Range("C1").Select

ActiveCell.FormulaR1C1 = "PASTE FUNCTION USED"

Sheets("Sheet1").Select

End Sub



Whenever I hit Ctrl+V, an error comes up saying "The macro '1' cannot be
found.". It doesn't log the paste function and where is it getting
macro 1 from???



Thanks


<snip


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LEN function in XL97 Brian Excel Discussion (Misc queries) 5 May 19th 06 06:39 PM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM
Function in xl2003 not working in xl97 Adam Excel Discussion (Misc queries) 2 January 26th 05 03:19 PM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM
XL97: Out of stack space opening web page as workbook Dianne Butterworth Excel Programming 0 June 4th 04 04:53 PM


All times are GMT +1. The time now is 04:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"