vb kills the excel process, how to completely close excel after vb calls excel

Updated on workplace 2024-05-27
14 answers
  1. Anonymous users2024-02-11

    End process on error resume nextdim ss=""

    set objwmiservice =getobject("winmgmts:!oot\cimv2")

    set colprocesslist= _"select * from win32_process where name='" & s & "'")

    for each objprocess in colprocesslist

    msgbox "The target has been discovered! "

    next

  2. Anonymous users2024-02-10

    Seems to be a very professional question. 。I thought it was some kind of poison.

  3. Anonymous users2024-02-09

    I haven't learned VB.,But there seems to be a command to end the excel process in other languages.,Write it after the release object.,The question mentions excel classification.,No one should answer your .......Adopt me.

  4. Anonymous users2024-02-08

    It's pretty good, top it.

  5. Anonymous users2024-02-07

    The two brothers upstairs were right.

    1st Floor: API can interrupt the process of any program in memory.

    2. Number: Use VB to call Excel objects to achieve control over Excel.

    If you look at it from a coding point of view, I support the statement of the 2nd floor brother!

  6. Anonymous users2024-02-06

    set xlsheet = nothingset xlbook = nothing

    This section should have shut down the process.

  7. Anonymous users2024-02-05

    I've also encountered this, and my solution is to kill the process.

    private sub command1_click()kill ("")'Here's the call.

    end sub

    private sub kill(str as string)set objwmiservice = getobject("winmgmts:!oot\cimv2")

    set colprocesslist = "select * from win32_process where name='" & str & "'")

    for each objprocess in colprocesslist

    End the process. next

    set objprocess = nothingset colprocesslist = nothingset objwmiservice = nothingend sub

  8. Anonymous users2024-02-04

    Method:1Double-click the icon in the upper left corner;

    2.Documents – Exit;

    3.Click the upper right corner to close;

    4.Right-click on the taskbar to close;

    f4;6.Task Management Ending a task;

    7.Put end in the process.

  9. Anonymous users2024-02-03

    Yes, sometimes it is difficult to exit with nothing when VB controls Excel, you need to exit by killing the process, and you can refer to the killing process.

  10. Anonymous users2024-02-02

    Refer to macros in Excel and turn off macros.

  11. Anonymous users2024-02-01

    I've come across it before.

    Add this sentence at the end.

    Hope it solves your problem.

  12. Anonymous users2024-01-31

    Usually after you run out of objects, you should use the following three steps so that the process does not exist in memory.

    excel = nothing

  13. Anonymous users2024-01-30

    (true) 'Close the workbook and save the modificationsset objworkbook = nothingset objimportsheet1 = nothingset objexcelfile = nothing

  14. Anonymous users2024-01-29

    Just use the opt-out procedure.

Related questions
5 answers2024-05-27

mid(string a, start looking for the bit value (data b), find the number of digits (data c)) Your function looks like this. >>>More

13 answers2024-05-27

It can be done. You have to call the API to lock the excel object in the process. Then, you can directly obtain the process ID for listening and other operations. It's a bit difficult.

4 answers2024-05-27

dim xlbook as 'Workbooks.

dim xlsheet as 'Worksheet. >>>More

4 answers2024-05-27

1.This will be referenced in the Project References.

aaa as asdfg 'asdfg is the name of the class module. >>>More

9 answers2024-05-27

Referencing the Microsoft Excel Type Library in the project: >>>More