Heard of PsTools? U will luv it... it has many features that would help u in your case. here's a link to download it: http://www.sysinternals.com/file/pstools.zip
Have Fun!
...you can kill a program by using API functions or by using pskill from pstools.
to use API, by the way, you must know the classname and/or title of the program that you want to close...use spy.exe, if you want to get a class name of a program. run Calc.exe then try this:
option explicit...
...i have written a function that will return nth number of weekday sometimes ago. here it is:
Function NthWeekDate(NthDays As Integer, Optional tmpDate As Date = 0) As Date
Dim i As Integer
Dim n As Integer
Dim myDate As Date
Dim myWeekDay
If tmpDate = 0 Then...
...you can use the GetObject method like this:
Dim myAcc As Access.Application
Dim dbName As String
On Error Resume Next
dbName = "Test.mdb"
Set myAcc = GetObject(, "Access.Application")
Debug.Print myAcc.CurrentDb.Name
If...
...it can be done with several API function or just make it simplier, use AppActivate statement from within VB like this:
AppActivate "temp", 1
...Have Fun!
how do you populate the list view? is it with a recordset that has a flag of what was checked or not? let me know... 'cause i have done something like that but may be, we have to approach differently in your case.
Have Fun!
...try using Open statement to open the file as binary for read only access. and if you know the byte position of the value that you're looking for, then try using Seek function to help return the value faster... something like this:
Dim TextChar
Open "c:\temp\FILE.rpt" For...
...for checking if an application is running from another vb app, there are atlease two ways to do it.
1- using pslist from pstools. here's a link to download it:
http://www.sysinternals.com/files/pstools.zip
...from vb use shell command to execute the pslist command and pass the name of the...
...sorry for the misunderstanding. try this:
Dim myXL As Excel.Application
Dim FileName As String
On Error Resume Next
FileName = "C:\Main2.xls"
Set myXL = GetObject(, "Excel.Application")
Debug.Print myXL.ActiveWorkbook.FullName...
Set MyXL = GetObject("C:\Main2.xls", "Excel.Application")
should be:
Set MyXL = GetObject("C:\Main2.xls", "Excel.Sheet")
by the way, if you just need to check for a specific file,
try this:
Dim myXL As Object
On Error Resume Next...
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.