Use VBA to open two workbooks in the same path

Updated on technology 2024-08-09
12 answers
  1. Anonymous users2024-02-15

    ""You can press f1 for help and see how to use it in detail.

  2. Anonymous users2024-02-14

    Is it a click of a button to sync? Or do you have to synchronize every step of the way?

  3. Anonymous users2024-02-13

    1. Put the excel file that needs to be merged and the destination excel file in one folder.

    2. Open and load the "Development Tools" menu under the excel menu.

    4. Make an import key. Click on the "Development Tools" menu and select the command button under the "Insert" --activex control. Draw a command button in the worksheet.

    5. Click "Design Mode" under "Development Tools", and then double-click the command button "CommandButton1" you just created to enter the ** box.

    6. Copy all of the following into the box.

    7. Save the HB file as a macro-enabled workbook. Close the current ** box and return to the excel interface. Select "File" --Save As --Save as "Save Type" and select "Macro-Enabled Workbook" under "OK".

    8. Open and click the button. Sheets A, B, and C from the Excel file that need to be merged are merged into this file.

  4. Anonymous users2024-02-12

    VBA** is as follows:

    sub s()

    pth = "d:\my documents\" 'Enter here the full path to the folder where the file is located.

    fn = dir(pth & "*.xls")

    set newbk =

    set sht =

    k = 1do while fn <>""

    set wb = & fn)

    for i = 1 to

    1) = fn & ":" &

    k = k + 1

    1).pastespecial xlpastevaluesandnumberformats

    k = + 1

    nextfalse

    fn = dir

    looppth & "" 'Set the file name of the merged file here.

    falseend sub

  5. Anonymous users2024-02-11

    There are a few questions that need to be confirmed: Is the folder path fixed? Are the worksheets formatted the same? Does replication include header rows?

  6. Anonymous users2024-02-10

    where A and round bucket B are the paths of two Excels.

    function recompose_excel(a,b)set objexcel = createobject("")= false

    set excelbook_s =

    sheet1").select'Select sheet1'Copy the contents of sheet1 when destroying the cover.

    trueset excelbook_s = nothingset excelbook_t =

    sheet1").select'Select sheet1excelbook"a1"Tangerine Aftergrinding).pastespecialexcelbook_

    excelbook_

    set excelbook_t = nothingend function

  7. Anonymous users2024-02-09

    Can't see what you're going to do. It seems that this can't be done.

  8. Anonymous users2024-02-08

    The problem description is too simple, it should be a wrong reference, please paste the complete ** or upload the ** to help you modify.

  9. Anonymous users2024-02-07

    If nothing is written, nothing changes, then the starting path is probably my document sub aa().

    msgbox curdir

    end sub

    sub bb()

    chdrive "d:\"

    chdir "d:\backup"

    ''''' dir("*.xls", vbnormal)end sub

  10. Anonymous users2024-02-06

    I am afraid that it is difficult to open at the same time, so I can only open it one after another.

  11. Anonymous users2024-02-05

    You said that there is a mutual Mao shield, you said that you use VBA, why do you have to do it manually.

  12. Anonymous users2024-02-04

    You record a macro that duplicates the worksheet and try it yourself!

Related questions
7 answers2024-08-09

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

7 answers2024-08-09

If you have forgotten the password to open the excel file, and the password is a number within 6 digits, you can use the following steps to unlock it (close all programs, for speed): >>>More

14 answers2024-08-09

oleobject object.

See the Properties Method Event Property. >>>More

16 answers2024-08-09

Here's a look: excel toolset 00130 generates random numbers (random time, random integers, random values, unique random values).

8 answers2024-08-09

You can enter the properties of your computer to set it, open the properties of my computer, click on the folder option, and then check the box in the general interface to open different folders in different windows and click the OK button to achieve it. Specifically, take the win10 system as an example, and the setting method is as follows: >>>More