Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to use copy in excel closes the workbook

Status
Not open for further replies.

timmer69

Programmer
Joined
Jul 7, 2005
Messages
12
Location
GB
I am having a strange problem with an excel workbook. when i try to copy a cell using ctrl-c, the worksheet closes. i have eliminated macros as being the cause. the error also occurs when you right-click and select copy, or when you select copy from the edit menu. also, and i believe this is related, a macro that uses selection.copy now gives an error message, although excel does not close in this case. Otherwise, no error message is given.

This problem only occurs with one workbook, and all other workbooks that i open copy as normal.

i don't know if it's relevant, but the workbook file was created by another user who had the problem, and they emailed it to me to try and sort out!

Any ideas what's causing this?
 
Just a quick thought when I first read this message, have you tried running detect and repair from the Drop Down Help Menu to see if this repairs the problem. This is in Office 2003. Not sure what version you have ?
Cheers
 
i can't use the detect and repair because i don't have access to the network resources that it requires. it's office 2000 btw. i'll try and get granted access though. cheers
 
Hi timmer69,

If it's just in one workbook then that workbook is (almost certainly) to blame - not the application, so it's unlikely that detect and repair will do anything.

Does the other user have it in more than one workbook?

If you have macros (in order to see an error in one) then how, exactly, have you eliminated them as the cause?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
because i have opened the worksheet with macros disabled and the error still occurs. also, i checked that no macros had been associated with the ctrl+c keystroke
 
OK - macros disabled is a good check.

Is it just the one workbook for both you and the other user?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
yes, apparently it is!

thanks.
 
Well, I'd put it down to some sort of corruption, copy the data out to a new workbook, and forget about it unless it happens again.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
well, good as that suggestion sounds, it is impossible to copy the data because excel's built in 'copy' method appears to be corrupted for this worksheet. just going to have to use and earlier version of the file, and then update the data by the looks of it.
thanks for your time anyway tony.
 
rather than use the 'Ctrl+C' copy, try copying the workSHEET itself - to do this, right click on the sheet tab and choose 'Move or Copy'

Choose 'Copy' and 'New Workbook'



Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
thanks geoff, i hadn't thought of that. just tried it with all of them, and the ctrl-c problem still manifests itself in the new workbook! This makes me think now that the error must be in one of the worksheets. I guess i'll copy the sheets to a new workbook one by one. joy!

thanks
 
well, so much for that plan. every sheet does it, even when i copy a single sheet to its own workbook it happens! also, it is now apparant that the ctrl-c problem only happens when certain cells are selected...brilliant.

Don't think this is an error that can be corrected except by putting everything in the 'circular file' and reverting to an old copy. still, on the plus side, as it's not my file, i won't be the one who has to update it :)

Thanks for all your help.
 
Sorry, the copy problem didn't occur to me when I said copy it out to a new workbook!

Can you save each sheet as a csv, and then import back in to a new workbook? That should just copy as text. You'll lose some things like defined names but better that than lose the whole shebang.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Just a thought but you could try opening the excel file in Star Office as that is very good at reading problems with excel files. I have recently just managed to recover a whole file by installing Star Office 5.2 which is I believe a free product but I had this with my machine just never installed it.

The excel file I had problems with wouldn't open in Excel 97/2000/XP/2003 but opened fine in Star Office. I re-saved it in Star Office as a different file name as excel xls format and it now works in Excel fine. Might be worth a try ?
 
ok, i'll give those a go. Thanks for the suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top