The code below can be used to delete the module which houses the Code. In other words, it deletes itself after running once.
You will have to goTools>Macro>Security-Trusted publishersAnd check trust accessVisual Basic EditorBefore running the code. Change"Module1"To suit.
Sub deletethismodule ()
Dim vbcom as object
Msgbox "hi, I will delete myself"
Original source: http://www.cnblogs.com/Charltsing/p/EncryptVBACode.htmlVBA code encryption is a commonplace issue, and since my VBA dumper was released, any encryption at the office level has lost its meaning. So, many people began to move to the VB package or upgrade to Vsto,delphi and other languages. However, for the vast majority of Vbaer, the problem of re-learning a language is far more than the bene
Original source: http://www.cnblogs.com/Charltsing/p/unviewable.htmlqq:564955427Email: [Email protected]I was asked to unviewable+ VBA to protect the VBA code can be cracked, so I went to the author's website to see a bit (URL).This tool protects the VBA code fairly well, bu
That is, add a worksheet to the workbook, and then move out of the workbook to a new workbook, and copy the code of one module of the workbook to the new workbook before moving out. Here is the key code: '====================================================================== 'Each class list is saved as a single XLS fileActivesheet.moveChDirMyPath'Ignore dialog box, overwrite saveApplication.D
1:excel number of rows in a tableSheets (1). UsedRange.Rows.CountSheets (1). UsedRange.Columns.CountOrSheets (1). Range ("A65536"). End (Xlup). Rowsheets (1). Range ("A65536"). End (Xlup). ColumnA point to note is that before the Mac (Apple System) on the friend of the Excel VBA programming, with the above code will be error, can only use the following type of wording;2: CopyLine copy:' Copy the nth row in
Referencing a dynamic-link library in ArcMapI built a dynamic link library file VBAPrj.dll under VB6, which has a class of module VBACLS, which has a method test (Doc as Object).There are three common methods ( author : Zhang):1. Open the VBA editor, click the References command under the Tools menu, and reference the dynamic link
The following class excellibrary is a very common class that uses VBA to manipulate excel. It is my summary, arrangement, and reference in my work (I have used some examples from Microsoft) I have made many improvements and usage, and I will share them with you here.At first, the program had no comments. For ease of understanding, I just added some comments.
'Manipulate the Excel general class library VB. N
From: http://blogs.msdn.com/ B /vsod/archive/2009/10/02/excel-how-to-run-c-code-behind-with-a-click-of-a-button-on-a-worksheet-without-vba-code.aspx
Excel: How to Run C # code behind with a click of a button on a worksheet, without VBA codemsdnarchive
2 Oct 2009 pm
0
OLE object controls such as command button, ch
When you write VBA code in Excel, the most common thing you can do is manipulate the data in the cells in the form. I'll summarize here how to manipulate the data in a cell from VBA code.The Range object is required to manipulate cells in VBA code, and range is a class provi
BackgroundThe business needs to write all the corresponding pages according to the detailed design documentProblemHeavy workload, 11 large tables (dozens of hundreds of fields) time tight 3 days to completeCoreThere is a complete table design that can be edited manually through Excel.New issuesNormal field is not a problem, can increase the workload of the dictionary after a sudden increase, this particularity makes the work difficult and volume of the manual operation of Excel poses a challenge
Sometimes, when using Word for text editing, suddenly encountered power, or computer automatic shutdown, crash, and other failures, resulting in the work of hard to do out of all the results, is a lot of netizens are very crazy things. Today, I'm going to teach you. Use VBA code to automate backup so that Word can be automatically backed up every few minutes without affecting the file being edited. Let's ge
Method 1: Use VBA's original properties, methods, and worksheet functions as much as possible
Because the Excel object is up to odd, the object's properties, methods, and events are numerous and may not be fully understood by beginners, which results in a code snippet that programmers often write about the same functions as the properties and methods of Excel objects. The efficiency of these snippets is obviously different from the properties of the
The error message given by Excel VBA error is minimal and requires the full use of various tools for debugging.1. Compilation errorsCommon compilation errors include the following:The wrong source code format, such as missing then after if: In the editor, the line turns red.Incorrect syntax structures, such as if and end if do not correspond: The code will be giv
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 create a xlsm workbook:Macro workbook, you must have a VBProject object, at least one worksheet1 stringPath =@"E:\studyvs\open xml\test.xlsm";2 varPackage =Newexcelpackage ();3Package. WORKBOOK.WORKSHEETS.ADD ("Sheet1");4 //Create a Project object5 Package . Workbook.createvbaproject ();6 //Save Workbook7Package. SaveAs (NewFileInfo (path));8System.Windows.Forms.MessageBox.Show ("created successfully");To write code to a macro file:1 stringPath =@"
In Excel, in order to enhance the contrast of the active cell, sometimes we need to modify its background color, font, font size, and so on, to differentiate and other cell contrast!
In this tutorial, let's learn how to make Excel active cells have the background color in rows and columns, first look at the figure below.
In the picture above, that is, C3 cell, is selected by the mouse, indicating that the active cell, how to do as shown above, C3 active cell row and column, the bac
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
There are many ways to delete empty rows and columns in exce, it is relatively simple to delete empty rows, just filter, filter out blank lines, Delete them, But it is difficult to delete empty Columns. Because you cannot filter by column to Delete. This feature is not in Excel. Of course you can use another method, that is, sort by column, sort the blank columns together, and then delete, but this method faces the problem that the order of the columns is disturbed, thankless. This article will
How to use VBA code to implement automatic daily backup of Excel documents
To achieve this "tall yet" features existing Excel features cannot be completed, but also the method of VBA programming. Of course, as you do not understand the VBA code, just follow the steps below
,{})) In general, JS anti-aliasing is not complicated, the outermost eval replaced document.write, the real code can be seen. But how do you implement this in VBA?Take a look at the following code:Dim odoc as Object,htmlSet odoc = CreateObject ("Htmlfile")Html= above the JS' Construct an HTML, replace the eval inside JS with document.write, do the anti-confusionhtml = "document.write (" Right (HTML, Len (
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.