paste is gone, please help quick

  • Thread starter Thread starter Jack Sons
  • Start date Start date
J

Jack Sons

Hi all,

Suddenly paste (worksheet function as well as VBA) will work only on the
same sheet, so I can't copy anything to another sheet nor to another
workbook.

This is a real disaster.

Please help. I use XP SP2 with Excel 2k

Jack Sons
The Netherlands
 
Do you have any worksheet events firing?

_selectionchange
_change
_deactivate
_activate

(remember to check for workbook level events, too.)

One of the bad things about running macros is that they sometimes kill the
clipboard.
 
Dave,

Even if I open Excel anew and open a new workbook (Book1, it is not called
Book1.xls , Book1.xlt or Book1.xla) copying to outside the same sheet is
impossible.

I checked that there is no code whatsoever in any sheet module or the
workbook module of that Book1, it has no code modules.

Jack.
 
Do you have any addins (application events) running?

If you open excel in safe mode
windows start button|Run
excel /safe

then file|Open your workbook

Can you copy|paste?
 
Dve,

Indeed, in the safe mode copy and past works, but I think the safe mode will
not give me all possibilities that I get in the normal mode, which I really
need.
Do you have any addins (application events) running?
How can I know? As I said, when I open Excel and start an absolute blank new
workbook with no code (so nothing can be running, Excel also does not ask if
I want to open with macros working), I can't paste and copy.

What could be wrong and how to overcome this? Without copying and pasting I
can do hardly anything, none of my programs will work. I work many hours per
day with Excel, so it is really disastrous.

I'm in dire need of your help.

Jack.
 
Open excel normally.

Open the VBE (alt-f11)
hit ctrl-r to see the project explorer.

What open workbooks do you see?

I see this in mine:
funcres (FUNCRES.XLA) (anaylsis toolpak for Excel stuff)
personal (personal.xla) (my own set of macros/functions)
VBAProject (book1) (initial empty workbook)

You could have an addin started via tools|addins or if it's located in your
XLStart folder.

Here's a couple of links that describe how to troubleshoot this kind of problem:

Chip Pearson's:
http://www.cpearson.com/excel/StartupErrors.htm

Jan Karel Pieterse's:
http://www.jkp-ads.com/Articles/StartupProblems.htm

Jack said:
Dve,

Indeed, in the safe mode copy and past works, but I think the safe mode will
not give me all possibilities that I get in the normal mode, which I really
need.
Do you have any addins (application events) running?
How can I know? As I said, when I open Excel and start an absolute blank new
workbook with no code (so nothing can be running, Excel also does not ask if
I want to open with macros working), I can't paste and copy.

What could be wrong and how to overcome this? Without copying and pasting I
can do hardly anything, none of my programs will work. I work many hours per
day with Excel, so it is really disastrous.

I'm in dire need of your help.

Jack.
 
Dave,

Surprise, surprise, I found the code below in the ThisWorkbook module of
personal.xls.

When I deactivated the ActiveWindow.DisplayZeros lines in the last two subs
the problem was gone. Can you explain why?

Jack.



Option Explicit
Public WithEvents xlApp As Application
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set xlApp = Nothing
End Sub

Private Sub Workbook_Open()
Set xlApp = Application
End Sub

Private Sub xlApp_SheetActivate(ByVal Sh As Object)
'ActiveWindow.DisplayZeros = False
End Sub

Private Sub xlApp_WorkbookActivate(ByVal Wb As Workbook)
'ActiveWindow.DisplayZeros = False
End Sub
 
Lots of macros break the clipboard. But not all of them do. It depends on
what's in the code.

It looks like this command is one that breaks it. (I have no idea why
somethings clear it and some don't.)



Jack said:
Dave,

Surprise, surprise, I found the code below in the ThisWorkbook module of
personal.xls.

When I deactivated the ActiveWindow.DisplayZeros lines in the last two subs
the problem was gone. Can you explain why?

Jack.

Option Explicit
Public WithEvents xlApp As Application
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set xlApp = Nothing
End Sub

Private Sub Workbook_Open()
Set xlApp = Application
End Sub

Private Sub xlApp_SheetActivate(ByVal Sh As Object)
'ActiveWindow.DisplayZeros = False
End Sub

Private Sub xlApp_WorkbookActivate(ByVal Wb As Workbook)
'ActiveWindow.DisplayZeros = False
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top