vb how to open excel close and open again

Updated on technology 2024-03-20
4 answers
  1. Anonymous users2024-02-07

    dim xlbook as 'Workbooks.

    dim xlsheet as 'Worksheet.

    dim xlrange as

    The above are public variables.

    private sub command1_click()set xlapp = createobject("") 'First floor.

    set xlbook = "d:\")

    trueend sub

    private sub command2_click()end sub

  2. Anonymous users2024-02-06

    I met me solve the case kill process private sub command a click() kill ("")'Call end sub private sub kill(str as string) set objwmiservice = getobject("winmgmts:!OOT CIMV II") set colprocesslist = "select * from win32 process where name='" & str & "'") for each objprocess in colprocesslist 'End process next set objprocess = nothing set colprocesslist = nothing set objwmiservice = nothing end sub

  3. Anonymous users2024-02-05

    1. First of all, open the task manager by shortcut key Ctrl+Alt+Delete.

    You can also move the mouse over the taskbar.

    , right-click and select Launch Task Manager.

    2. The application in the task manager.

    There is no such program below, which means that VBS is a process, and you have to click on the process view option.

    3. Then find this process in the process, if the process list has been changing, you can click on the process options above to arrange these processes in order.

    4. Then select the process and click the End Process button in the lower right corner.

    5. Then make sure to end the process so that the computer desktop.

    The VBS whole person ** window on it was forced to close.

  4. Anonymous users2024-02-04

    Open Task Manager (right-click on the box below) and find the WS ......of the program, close it.

Related questions
13 answers2024-03-20

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.

9 answers2024-03-20

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

2 answers2024-03-20

Hehe, it's too simple, and there are many ways. Here's the simplest example: >>>More

18 answers2024-03-20

Maybe there's something wrong with your software system.

7 answers2024-03-20

Are you going to get into a VBA? Or do you want to do VBA's **? >>>More