Read the "Excel Professional Development", the biggest shock is the author of the Pursuit of VBA technology and the design of Excel works of art. Inspired by the author, he also intends to summarize some of his experiences in daily development, as a reserve of knowledge and to share it on the Internet. Excel formulas, functions, and the formatting of their own cells provide a great convenience for the design of the UI, which is detailed in the Excel P
Test the next Zhejiang Provincial Education Examination Institute for the 2018-year simulation exercise (volunteer) file, found a lot of bugs, want to modify the VBA code, but found that VBA has a project password, do not want to stop, so refer to the relevant information on the Web will be VBA source code extracted, attached here, For the convenience of the need
First of all, the company every month at the end of the request staff to fill out the attendance information, and then sent a template, I think every time to fill in the date and the day of the week such information is more cumbersome, so think of a lazy way, but also made a change to the template style, so that its information display efficiency has been improved.The simple thing to do is to use the VBA features that are available in office to automa
There are many ways to delete empty rows and columns in Exce, relatively simple to delete empty rows, just filter, filter out blank lines, delete them, but it is difficult to delete empty columns. Because you can't filter the deletion by column. Excel does not have this
A feature. Of course you can use a different method, that is, sort columns by column to sort the blank columns together, and then delete, but this method faces the problem of the order of the column is disturbed, thankless. This
Chinese test, often used in writing manuscript paper, Word with the template, but there are many restrictions (such as paper type, number of rows and so on relatively fixed), in the examination papers typesetting is quite inconvenient. After trying, the author found a way to use Word VBA programming to realize the test writing manuscript by drawing the form.
I. Preparation of procedures
1. Start Word, click "Tools" continuously, "macros, record new
You can use Word macro commands to increase your productivity when you edit a document using Word. By default, the security setting for Word macros is high, and macros are automatically disabled when you run the Word Macro command. If you set the Word macro security to Medium, the Word Macro Security warning dialog box pops up every time you run the Word macro. If you set your Word macro security to low to suppress a security warning, you can increase the risk of malicious code or virus damage.
VBA features in Word make Word documents interactive, and in school teaching, you can use Word VBA to make interactive selections in Word documents. To use Word2003 to make a two-item selection Word document as an example, the following steps are described:
Step 1th, create a blank Word document, enter the topic section of the selection question, such as "a complete computer system includes ()", and then s
IamlaosongTo do a tool requires the user to select in the list box, and then do the appropriate action, if you do not choose, to give hints, debugging found, take the value of the list box, if you do not choose, this value is null (empty), it is not normal to judge it, such as the following statement:StationName = Listbox2.valueIf Stationname=vbnullstring ThenDebugging found that the above if conditions whether with "=" or "stationname) =0 is also not established, because at this time the variab
manually.This is the Department fee table, the above data need to update the cost of the corresponding number in the table below. The original two cost tables with inconvenient first put in a sheet, so it is more convenient to find.Write a VBA program, loop through the numbers, then look in the Department number table and replace the values on the right. There is an error in the processing, otherwise if you do not handle the words can not find the nu
(Tab. Name) +" "+Trim(Tab. Comment)Tab. Comment =Trim(Tab. Comment)End if DimCol'Field Handling for eachColinch Tab. Columnsif Left(Trim(Col.comment),Len(Trim(col.name))) Trim(Col.name) Thencol.comment=Trim(col.name) +" "+Trim(col.comment) col.comment=Trim(col.comment)End if Next End if Next DimView'View Processing for eachViewinchfolder. viewsif notView.isshortcut Then
Sub T1 ()Range ("d2") = Range ("b2") * Range ("C2")Range ("d3") = Range ("B3") * Range ("C3")Range ("d4") = Range ("b4") * Range ("C4")range ("d5") = Range ("b5") * Range ("C5")Range ("d6") = Range ("b6") * Range ("C6")End SubSub T2 ()Dim x as IntegerFor x = 10000 to 2 Step-3Range ("D" x) = Range ("B" X) * Range ("C" X)Next xEnd SubSub t3 ()Dim RG as Range//range represents a Cell objectFor each RG in Range ("D2:d18")RG = RG. Offset (0,-1) * RG. Offset (0,-2)Next RGEnd SubSub t4 ()Dim x as In
' Check public Function check () as Variant on Error GoTo erlb dim strdir as String st Rdir = Thisworkbook.worksheets ("Path"). Range ("B2") objfile = Dir (Strdir "\*.xlsx") thisworkbook.worksheets ("Result"). Activate with ActiveSheet . Range ("a2:b400"). Select '. Cells.select selection.clearcontents . Range ("A1"). Select end with application.screenupdating = False do while objfile icnt = 0 startrow = 9 with ActiveSheet for iRow = StartRow to MaxRow If Trim (ActiveSheet.Ce
Learn VBA, just to make a small tool for finance:Sub Open Personnel Information table () Dim WB as Workbook, C as Integer Set WB= Workbooks.Open ("C:\Users\wzn\Documents\ Workbook 2.xlsx",0, True) c=WB. Worksheets.count If C3Then WB. Worksheets.add after:=Worksheets (worksheets.count) WB. Worksheets (1). Select End SubSub Add selected person () Dim FW as Worksheet, LW as Worksheet, fr As Integer, LR As Integer, RG as Range Set FW =ActiveSheet Set LW=
-looking, but fortunately realized,,,, good luck.Figure three Adding controlsFigure Four Control propertiesSummaryBoss is want to let me realize, but, Minister incompetent Ah ~ The first day are looking at two level linkage menu, found that do not need VBA Ah, degree Niang said data validation can be realized, the next day reaction came over, need is multi-box, during debugging code when a face confused force, said I control undefined, later, the boss
Statement one: If Judgment statementSub Judgment 1 () ' Single condition judgment If Range ("A1"). Value > 0 Then range ("B1") = "positive" Else Range ("B1") = "negative or 0" End IfEnd SubSub Judge 2 () ' Multi-condition-judged If range ( "A1"). Value > 0 Then range ("B1") = "positive" ElseIf Range ("a1") = 0 Then Range ("B1") = "equals 0" ElseIf Range ("B1") Statement two: IIf function judgmentSub Judgment 4 () Range ("a3") = IIf (Range ("A1") Statement three: Selec
Excel and VBAProgramDesign, latest news, expected to go public in September
Since the summer of, I wrote "Excel and VBA program design", which received support and encouragement from many netizens. I downloaded statistics from the blog garden, more than 52000 downloads have been downloaded [as of 2006.4.14].
Progress: http://maweifeng.cnblogs.com/archive/2006/04/14/375102.htmlHttp://maweifeng.cnblogs.com/archive/2006/03/31/363176.html mini edition
Iamlaosongassigning data in a worksheet to an array or assigning an array's data to a worksheet generally has two types, one is the loop method, the other is a pass-through, and this method is commonly used for situations where each data is specially handled, and the other is to use assignment statements at a time, and the second method is much faster for speed. Look at the following routines:sub tt () Dim arr1 (240000, 4) Dim arr2 () nbsp Lineno = [A1048576]. End (Xlup). Row ' number
;") return value I love you! Fill in the character placeholder from left to right. The default value is the right-left padding character placeholder.Format $ ("chin", "[email protected] @") Return Value cahin----------------------------------------Force Date and Time in Chinese format----------------------------------------Aaaa weekFormat $ (now, "aaaa") return value FridayO Chinese monthFormat $ (now, "O") returns the value MayO single-byte monthFormat $ (now, "O") returns the value MayA Chines
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.