| | |
Open Excel file from Visual Basic
Thread Solved |
•
•
Join Date: Mar 2006
Posts: 6
Reputation:
Solved Threads: 1
•
•
•
•
Originally Posted by Comatose
Nope, that's for .NET, which doesn't apply. Imports doesn't work in Legacy Vb's. However, setting the objects back to nothing is the proper way to go about this. Otherwise, you'll have tons of exe's (as objects) just floating around and eating up Ram.
So what should I do for solving my problem?
I want to put my excel cells in an array.
I added this code also but still Exel.EXE is remaining in memory
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
System.Runtime.InteropServices.Marshal.ReleaseComObject (xlSht) System.Runtime.InteropServices.Marshal.ReleaseComObject (xlWBook) System.Runtime.InteropServices.Marshal.ReleaseComObject (xlApp)
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
System.Runtime.InteropServices.Marshal.ReleaseComObject (xlSht) System.Runtime.InteropServices.Marshal.ReleaseComObject (xlWBook) System.Runtime.InteropServices.Marshal.ReleaseComObject (xlApp)
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
set xlSht = nothing set xlWBook = nothing set xlApp = nothing set xltmp = nothing
•
•
Join Date: Mar 2006
Posts: 6
Reputation:
Solved Threads: 1
I have written this code but still Excel.EXE is in task manager
If I run the program 3 times 3 EXCEl.EXE is in task manager
I have another problem also
As I said I want to store the cells in an array as the form loads
The code is :
But I have run time error '9' : Subscript out of range
Would you please help me?
Thanks.
If I run the program 3 times 3 EXCEl.EXE is in task manager
I have another problem also
As I said I want to store the cells in an array as the form loads
The code is :
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
ReDim Preserve Ucode2(101, 100) For i = 2 To xlSht.Rows.Count Ucode2(i, 0) = xlSht.Cells(i, 1).Value Ucode2(i, 1) = xlSht.Cells(i, 2).Value Next
But I have run time error '9' : Subscript out of range
Would you please help me?
Thanks.
![]() |
Similar Threads
- opening excel file in visual basic 6 (Visual Basic 4 / 5 / 6)
- getting data from a text file and putting it in an excel file using visual basic 6.0 (Visual Basic 4 / 5 / 6)
- open a PDF file in visual basic (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: SPI data transfer to Atmega8 by VB6 through parallel port
- Next Thread: winsock question
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






