RotoGuru Computer Forum

View the Forum Registry

XML Get RSS Feed for this thread


Self-edit this thread


0 Subject: Excel Macros, locking cut and paste

Posted by: Tree
- [1411442914] Tue, May 02, 2006, 15:29

so, here's my dilemma.

one of my accounts requires you to submit your solicitation items on an excel grid they provide.

on that grid. you required to enable the macros. if you disable the macros, it locks you out of the tabs you need to access.

however, when you enable the macros, it does not to permit you to cut/copy and paste. when you've got 80 items of submission, with dozens of columns per item, that is an incredible amount of hand-keying, especially when you've already gathered the information on a slightly different grid elsewhere.

anyone have any suggestions/ideas about how to activate the cut/copy and paste part?
1Frick@Work
      Donor
      ID: 3410101718
      Tue, May 02, 2006, 15:47
Can you clarify a few things.

Are you selecting multiple cells to copy and paste? I've run across a similar problem in excel, where I've had to go into a cell to copy information. Try clicking in the edit bar on top and hitting CTLR+V after you have copied the data.

How are you tring to copy and paste?



On a different tack, is there a "business" reason why you can't copy and paste?
2Tree
      ID: 1411442914
      Tue, May 02, 2006, 16:45
1. yes, multiple cells.

2. doesn't allow you to copy and paste at all. even within the edit bar.

3. completely disables copy and paste, including the icons, incluidng CNTRL-V.

4. interestingly, also seems to disable copy and paste in any other excel file i open up while the file in question is open.

however, i can copy and paste from a Word Document...
3Tree
      ID: 1411442914
      Tue, May 02, 2006, 16:50
also - as for the "business" reasons - you got me. they're not answering the question when posed.
4Richard
      Dude
      ID: 204252420
      Tue, May 02, 2006, 19:23
How much of a VBA programmer are you? I found this example code for both disabling copy/paste and enabling copy/paste using VBA Macros in Excel. Perhaps, it is as simple as inserting and then running the EnableCopyCutandPaste macro.



Option Explicit


Sub DisableCopyCutAndPaste()
EnableControl 21, False ' cut
EnableControl 19, False ' copy
EnableControl 22, False ' paste
EnableControl 755, False ' pastespecial
Application.OnKey "^c", "Dummy"
Application.OnKey "^v", "Dummy"
Application.OnKey "+{DEL}", "Dummy"
Application.OnKey "+{INSERT}", "Dummy"
Application.CellDragAndDrop = False
Application.OnDoubleClick = "Dummy"
CommandBars("ToolBar List").Enabled = False
End Sub

Sub EnableCopyCutAndPaste()
EnableControl 21, True ' cut
EnableControl 19, True ' copy
EnableControl 22, True ' paste
EnableControl 755, True ' pastespecial
Application.OnKey "^c"
Application.OnKey "^v"
Application.OnKey "+{DEL}"
Application.OnKey "+{INSERT}"
Application.CellDragAndDrop = True
Application.OnDoubleClick = ""
CommandBars("ToolBar List").Enabled = True
End Sub

Sub EnableControl(Id As Integer, Enabled As Boolean)
Dim CB As CommandBar
Dim C As CommandBarControl

On Error Resume Next
For Each CB In Application.CommandBars
Set C = CB.FindControl(Id:=Id, recursive:=True)
If Not C Is Nothing Then C.Enabled = Enabled
Next

End Sub

Sub Dummy()
'// NoGo
MsgBox "Sorry command not Available!"
End Sub


Richard
5CJ
      Sustainer
      ID: 499271021
      Sat, May 06, 2006, 23:48
WOW I suspect when you go to copy and paste with the Macros enabled then there must be a field hidden or criteria in a particular field that is preventing you to paste.
Have you tried using the "Paste Special"?
Have you tried using the Data - Import external Data? I have in the past used Access to allow the data to go into Excel much smoother.
6Tree
      ID: 2541778
      Sun, May 07, 2006, 09:18
it seems pretty insideous. it apparently ended up changing not just the file, but the entire template for Excel, as my ability to cut/copy/paste for *any* excel document was rendered impossible.

IT basically had to come in, and spend a bit of time on my computer recoding the template.
7Anon
      ID: 4611391518
      Tue, Dec 15, 2009, 19:39
It's not insidious. It prevents you from overwriting template formatting and possibly breaking formulas.

It does seem that they didn't implement it very well. They need to include code in the workbook_before close event to re-enable all of your cut/copy abilities. I'm only on this page right now because I'm writing code to force all cut actions to be copy, and all pastes to be pastespecial/values - which is what your developer should have done.
8Anon
      ID: 4611391518
      Tue, Dec 15, 2009, 19:40
Oh damn I just totally necromanced this thread.
9Guru
      ID: 330592710
      Tue, Dec 15, 2009, 20:14
Sometimes, Microsoft Office issues can be timeless....
RotoGuru Computer Forum

View the Forum Registry

XML Get RSS Feed for this thread


Self-edit this thread




Post a reply to this message:

Name:
Email:
Message:
Click here to create and insert a link
Click here to insert a block of hidden (spoiler) text
Ignore line feeds? no (typical)   yes (for HTML table input)


Viewing statistics for this thread
Period# Views# Users
Last hour11
Last 24 hours33
Last 7 days33
Last 30 days119
Since Mar 1, 2007133992050