Click here to Skip to main content
16,004,833 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVB.Net 2003 and VB6 Pin
Mekong River26-Oct-06 15:12
Mekong River26-Oct-06 15:12 
AnswerRe: VB.Net 2003 and VB6 Pin
Kevin McFarlane27-Oct-06 3:52
Kevin McFarlane27-Oct-06 3:52 
QuestionVery Urgent!!! Deadline!!! Pin
UltraCoder26-Oct-06 12:43
UltraCoder26-Oct-06 12:43 
AnswerRe: Very Urgent!!! Deadline!!! Pin
Dave Kreskowiak27-Oct-06 5:48
mveDave Kreskowiak27-Oct-06 5:48 
AnswerRe: Very Urgent!!! Deadline!!! Pin
Dave Kreskowiak27-Oct-06 5:54
mveDave Kreskowiak27-Oct-06 5:54 
QuestionUnload Close Command Pin
UltraCoder26-Oct-06 11:27
UltraCoder26-Oct-06 11:27 
AnswerRe: Unload Close Command Pin
Dave Kreskowiak26-Oct-06 18:02
mveDave Kreskowiak26-Oct-06 18:02 
QuestionResolving Excel Open Processes after ADO Connection Pin
pao_e_vinho26-Oct-06 8:57
pao_e_vinho26-Oct-06 8:57 
Hi
I need some help with this piece of code bellow.
I'm extracting pieces of information from Excel throug the following ADO connection.
This is a piece of VBA code implemented inside Access.

[code]Dim con As ADODB.Connection
Dim rs As ADODB.Recordset

Set con = New ADODB.Connection
With con
.CursorLocation = adUseClient
.Mode = adModeRead
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=E:\ExcelFileTool.xls" & _
";Extended Properties=""Excel 8.0;HDR=Yes"""
.Open
End With

Set rs = con.Execute("SELECT Site FROM [Clients$] WHERE Site = 'SiteOne'")
Debug.Print rs.Fields(0)

rs.Close
Set rs = Nothing

con.Close
Set con = Nothing [/code]

This code is part of an Access Module and it's inside a loop process. The problem it's related with Excel processes are kept open in the memory.

I'll try to explain the best I can, and sorry about my bad english.

If I run this piece of code without the Excel file opened, everything runs Ok.
But when I run the code with the Excel file in question opened (and I need it opened for other reasons), every loop will increase the Excel process memory about 250KB plus (I see it in TaskManager), and there's more.

When the loop ended, even closing the opened Excel, the Excel Process keeps open on the TaskManager.

The 250KB increasing is very problematic because this macro will run thounsands of loops per day.


Thanks
P&V
QuestionVB 2005 Pin
Pete Newman26-Oct-06 8:52
Pete Newman26-Oct-06 8:52 
QuestionTextBox Property Pin
andy3826-Oct-06 7:38
andy3826-Oct-06 7:38 
AnswerRe: TextBox Property [modified] Pin
AlexeiXX326-Oct-06 8:21
AlexeiXX326-Oct-06 8:21 
AnswerRe: TextBox Property Pin
ADY00726-Oct-06 8:56
ADY00726-Oct-06 8:56 
GeneralRe: TextBox Property Pin
Dave Kreskowiak26-Oct-06 10:02
mveDave Kreskowiak26-Oct-06 10:02 
QuestionPrinting a Form Pin
dptalt26-Oct-06 7:00
dptalt26-Oct-06 7:00 
AnswerRe: Printing a Form Pin
Dave Kreskowiak26-Oct-06 7:56
mveDave Kreskowiak26-Oct-06 7:56 
GeneralRe: Printing a Form Pin
dptalt26-Oct-06 8:25
dptalt26-Oct-06 8:25 
QuestionDelete key in table fields doesnt work? Pin
Muntyness26-Oct-06 6:46
Muntyness26-Oct-06 6:46 
AnswerRe: Delete key in table fields doesnt work? Pin
Dave Kreskowiak26-Oct-06 7:54
mveDave Kreskowiak26-Oct-06 7:54 
GeneralRe: Delete key in table fields doesnt work? Pin
Muntyness26-Oct-06 23:35
Muntyness26-Oct-06 23:35 
QuestionHow do I declare a class as a collection in VB Pin
Sean_B26-Oct-06 5:15
Sean_B26-Oct-06 5:15 
AnswerRe: How do I declare a class as a collection in VB Pin
mr_lasseter26-Oct-06 6:29
mr_lasseter26-Oct-06 6:29 
GeneralRe: How do I declare a class as a collection in VB Pin
Sean_B26-Oct-06 7:26
Sean_B26-Oct-06 7:26 
GeneralRe: How do I declare a class as a collection in VB Pin
Dave Kreskowiak26-Oct-06 7:49
mveDave Kreskowiak26-Oct-06 7:49 
QuestionVoice Over Ip Pin
Kofiwusu26-Oct-06 5:13
Kofiwusu26-Oct-06 5:13 
AnswerRe: Voice Over Ip Pin
Dave Kreskowiak26-Oct-06 7:44
mveDave Kreskowiak26-Oct-06 7:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.