[RESOLVED] closing an excel file from VB
I am extracting a column with 8760 cells from an excel file to my graph in my vb application. I managed to open and close the excell sheet from my program. However, when I try to run my application I receive this message:
There is a large amount of information on the clipboard do you want to be able to paste this into to another program later?
Is there a way that I can avoid receiving this message when calling the data from the excell file?
HOW??:confused:
Re: closing an excel file from VB
You could just try clearing the clip board.
VB.NET Code:
My.Computer.Clipboard.Clear()
Re: closing an excel file from VB
I tried but to paste the code in vb but nothing happened. I think I need to paste it the the excel macro that I am calling. do you know any solution?
Re: closing an excel file from VB
If the issue is that the clipboard is full, then clearing it will work. That means that you're not clearing in the right area.
Re: closing an excel file from VB
Application.CutCopyMode = False
thank you
Re: closing an excel file from VB
In your App, try assigning your working variables to Nothing as soon as your done with them.
Code:
xlSheet = Nothing
xlBook = Nothing
xlApp = Nothing
Re: closing an excel file from VB
Quote:
Originally Posted by
shadyattia
Application.CutCopyMode = False
thank you
Eh... whatever works ;)
Please mark the thread resolved by selecting it from the Thread Tools menu located near the top of the page.