All done!
This is a great idea, I wish I was aware of it before...
------------------------------------------------------------------------
Naprawdę nie zorientowałem się o tej możliwości. Byłbym to robił wcześniej po otrzymaniu zbawiennych rad.
Dzięki, Andrzej! [smile]
Thank you, jebenson!
It worked.
Looks like the order of closing/releasing of objects should be:
- oSheet
- oWorkBook
- oExcel
I did that, added GC.Collect() and GC.WaitForPendingFinalizers() and finally I got it working!
Thanks!
Thank you for your response!
I do more or less the same. Don't have GC.Collect() and GC.WaitForPendingFinalizers(), though. I'll add these two and try again.
Thanks!
My latest project was a VB.NET program, which gathers information from different machines in the domain and puts collected data into Excel spreadsheet.
The problem I have is the Excel part. I was able to open new or existing Excel file, place data on multiple worksheets and save it.
I realized...
Thank you jebenson for your response.
You gave me an idea, which I used: instead of putting "Dummy" node, I put the first subOU (if one exist) underneath. Then, while expanding, I repeat the same routine.
Works as I wanted: I'm adding child nodes "on the fly" when clicking on the "+" sign.
I’m working on a VB.Net project in which I have to use TreeView control filled with the Active Directory structure. The AD is very big, with hundreds of OUs and subOUs. Because of the size of AD I can’t fill the TreeView with the whole AD structure “in one shot” because it would take too long...
When it comes to Time Zones - I'm good. The date/time is calculated in UCT.
I called it "data base", but it looks more like a log file: flat text file.
I still have a problem calculating DateDiff.
Here are more details.
1. Person in Europe picks the date and time of certain process; for example date: “15.6.2013”, time: “13:15”
2. Information is written to the file as two string values: “15.6.2013” and “13:15” (European format)
3. Another...
I have a VB6 program distributed to the company’s system admins around the world. Recently I found out, that under certain circumstances, the program fails with “Type mismatch” error 13.
The error happens when calculating day difference between the date from some database and actual local date...
Need haelp.
In my Form_load() subroutine I check for certain things and want to start the GUI part (the form) only if the conditions met.
If the condition is not met, I issue the MsgBox and try to exit, something like this:If <condition> then
MsgBox "..."
Unload Me
End If
This doesn't...
SOLVED!
The code is good. I moved the project on another machine and it works like a champ.
Possibly the first machine (XP) had corrupted WMI installed (that's what Google says).
When running within the Studio, it stops on
myMgmtScope = New System.Management.ManagementScope("\" & sServer & "\root\cimv2", myConnOpt)
saying "Invalid parameter".
You can test it creating in the Studio new "Console application" and putting "Imports" line on top and the rest of the code...
I am trying to write VB.Net program, which would connect to remote computers and retrieve specific system information using WMI.
I must admit, that I am not experienced in VB.Net (wrote tons of programs in VB6, though, several of them using WMI). I cannot pass the first phase: connect to remote...
After days of testing and trying, I found the solution.
Here is the code:
Set oWShell = CreateObject("WScript.Shell")
sCmd = " ... "
Set oExe = oWShell.Exec(sCmd)
Do
sTmp = oExe.StdOut.ReadLine()
While Not sTmp = “”
...
sTmp = oExe.StdOut.ReadLine()
Wend...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.