After entering the factory, I found that the factory is completely different from the company. Most people do not need computers, let alone some management software. At most, you can use Excel to prepare various forms, which cannot be compared with various paperless office software in big companies.
Considering that the manual cost of preparing various tools and software is relatively high, the so-called fastest C # cannot compile a repository for management overnight, or decide to use Excel more in the future, in this way, all personnel can be improved to make it more efficient.
VBA has become a top priority. because the goal is to use Excel to make various reports or other things, the accumulated things are mostly related to these things, which are incomplete and practical.
Sub creates a new Workbook () set newbook = workbooks. add With newbook. title = "all sales ". subject = "sales ". saveas filename: = "allsales.xls" End withend subsub open an existing workbooks. open ("C: \ myfolder \ mybook.xls") end subsub copy a table to the current table () fname = "E: \ business accumulation \ vba_test_two.xls "'address and file name of the Excel file to be copied. Modify set D = GetObject (fname)' to open the file D. sheets ("sheet1 "). cells. copy activesheet. cells (1, 1) 'completely copies sheet1 to the current table D. close 'close the file set D = nothingend subsub to copy the table from the workbook to the B Workbook () dim A as workbook, B as workbook set a = workbooks. open ("E: \ business accumulation \ vba_test_two.xls") Set B = workbooks. open ("E: \ business accumulation \ vba_test_three.xls"). sheets ("sheet1 "). copy after: = B. sheets (B. sheets. count) B. sheets (B. sheets. count ). name = "test renaming". close B. save B. closeend sub deletes an existing Worksheet () Set B = workbooks. open ("E: \ business accumulation \ vba_test_three.xls") application. displayalerts = false B. sheets ("test renaming "). delete application. displayalerts = truenext B. save B. closeend sub