① Scrolling Line
Worksheets ("Sheet1"). Activate
Activewindow.scrollrow = 14
Code Explanation: The function of the above code is to activate Sheet1 first, use it as the active worksheet, and then automatically drag the vertical scroll bar to drag the 14th row to the first row, where the first row to the 13th line is dragged above the window and cannot be seen, while the 14th row is displayed at the top o
Object Model 6th6.1 EXCEL object model introduction 1166.2 Application Object 1186.2.1 control Excel status and display 1186.2.2 returned object 1206.2.3 perform Operation 1226.2.4 Windows Object and Windows collection 1266.2.5 Application Event 1266.3 workbook object 1306.3.1 workbooks set 1306.3.2 attributes of a wo
Development Environment)
•
Access Multiple debugging tools provided by Visual Studio. NET
•
Make full use of all. Net object models (such as ADO. Net)
•
Use server Resource Manager
•
Powerful functions for accessing the Microsoft. NET Framework class through Microsoft Office System
•
Select higher security options for the code you created
•
Implement fully object-oriented programming to compile
communicate with Excel4.1.1 Programming with VBA It's like cooking in the kitchen.4.1.2 VBA controls Excel by manipulating different objects4.1.3 Programming with VBA, you should remember which objects4.2 Everything starting from me, the topmost application object4.2.1 Use the ScreenUpdating property to set whether to
function name test and click the green arrow on the toolbar to test the function.
You can also add a control (such as a button) on the Excel worksheet and click the control to execute the function. Switch the menu to the developer tab. For example, click Insert to select the inserted control (if it is office2003, try-> toolbar-> control toolbox in the menu)
Click the button to draw a button anywhere in the worksheet, and click test, the function you
Premise: Because the use of VBA code readability and poor extensibility, want to use Python implementation, to improve the reuse rate.
The current idea is to write the basic information in Excel, when executing a macro, VBA calls Python code through the library, generate statistics, what library can I use to implement?
Reply content:Maintain an
Problem Analysis:Excel2007 the previous format is. xls, after which the format is. Xlxs. Open a separate Excel document and use the Save As feature to easily convert the format. But the face of hundreds of Excel tables so tired, search for a long time, also did not find a tool can be directly batch format conversion.Finally, you can use VBA to implement the abili
Select the workbook for the current activity:
Thisworkbook. Activate
If you choose another job book, the book must be opened, and you do not need to forget to add the suffix ". xls", for example:
Windows ("totol.xls"). Activate
Select a worksheet:
Sheets ("balance"). Activate.
Select cells:
Range ("A1"). Select
Select
= " Datfullname cnn2
. Open cnnstr
Windows (datfile). Activate
stname = activesheet.name
sqls = "Select message number, recipient name from [" Stname "$]"
Debug.Print sql s
Set rst2 = cnn2. Execute (SQLS) while not
Rst2. EOF
Debug.Print rst2 (0) Rst2 (1)
rst2.movenext
wend
End Sub
A few notes: 1. The data file "ID address 1.xls", which is read in this routine,
I want to write Excel macros to deal with the data, but I am not familiar with VBA language. So I decide the use of Python instead of VBA.At the beginning, I find XLRD,XLWT for Python Excel operations, and that's doesn ' t support Excel macro. Finally I find xlwings.Xlwings-make Ex
The VBA basics are coming to an end in everyone's attention. There are many classic VBA operations that we just briefly introduce, to use VBA skillfully, You need to digest and absorb it slowly, and then summarize and improve it in practice. Finally, we collected common VBA code to attract a large number of readers and
Saveactiveworkandquit ()
Activeworkbook.save
Application.Quit
End Sub
The following code does not prompt you to save the workbook when you exit Excel.
Save all open workbooks and exit Excel:
Copy Code code as follows:
Sub Saveallandquit ()
For each wbk in workbooks
Wbk. Save
Next
Application.Quit
End Sub
Quit Excel and all
Write the Excel VBA tool to connect and manipulate the MySQL database.System environment:Os:win7 64-bit English versionOffice 2010 32-bit English version1, VBA before the preparation of the connection to MySQLTools--->references. ----> ReferencesTick Microsoft ActiveX Data Objects 2.8 Librarys and Microsoft ActiveX Data Objects Recordset 2.8 Librarys2. Install My
files
※ Automatic compression using Web service and DLL (program Files of Windows)
Automatic sending of html/css/javascript/picture files to the Web server
※ If the folder does not exist automatically generated folder
Ping Automatic Sending
Web page display speed check (automatic operation of Gtmetrix site via IE control)
With the CMS to control the site, in any case will touch the HTML source code, so from the po
! Most people think of using software to crack passwords. Today we use VBA to crack passwords. Open the VBA editor. 1. Click Tools> macros> Visual Basic Editor to open the VBA editor. 2. In the Visual Basic Editor, click Insert-> module to insert a new module. Our code is written to this new module. 3. Copy the following code to the module without modifying any c
MyString as Stringmystring = "Const" "Const1" Sheet1.range ("A1"). the contents of Value = MyString ' A1 become constconst17. For LoopFor i = 0 to 10 Next I8. If statementIf i = 2 Then ' If I equals 2ElseEnd if9. While statementList = 1Do while sheet1.cells (1, list). Value 10. Implement characters that wrap content in a cellCHR (10)11. Check whether the file existsDir (file name of full path) ' file exists then return file name, not present then return to empty12. Look up from the last cell
This section describes how to use VBA to select a file and use VBA to open a file.Clicking open file will pop up a Windows File opening dialog box. In Excel, how does VBA implement this function?
Sub selectfile ()Dim filename as Variant'The file name returned by the open fi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.