I know where in my script my clipboard fills up and i put in a clipboard clear but I still get an system message saying my clipboard is to full and asks if i want to keep or remove the data. Is there somewhere i can set the size of the clipboard a little larger.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
I'm copying a excel sheet. I'm not sure the size of the sheet it's self, but there is only 10 lines in it so it can't be that big. I did read somewhere the size of the clipboard is dependent on the memory in your computer. I'm on an older computer with 512 meg of ram. My hard drive is getting close to full. I think that might be my problem. I will know better when I run the program on another system when it's done.
Here is a screen shot. Sorry it took so long i had other issues to deal with. Now I seriously need help with this problem. How can I disable this message.
Actually, that message doesn't say that the clipboard is full. It simply says that there is data in it, and it is asking you if you want it saved there after Excel exits or should Excel clear the contents.
That's Excel asking you... and it's not because you're running out of resources... but rather because what you do have consumes a lot. So when Excel (and Word and Access and Visio and most other Office apps do this too) closes, it is asking if you want to keep the clipboard data so you can paste it else where, or are you done with it, in which case ti will clear the clipboard for you.
as it is an excel alert, you should be able to prevent it by setting the displayalerts of the excel object to false application.displayalerts = false
change application to you excel object, make sure not to conceal any alerts you still want
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
the clipboard clear worked. I had that already in the program but I put it in after Excel closed. When I moved it to the line before Excel closed the problem was gone. Thank you for your help.