Tags: select Name records width INF from HTTP POST VATThe first step is to download the Postres driver on the Internet, after installation,: https://www.devart.com/odbc/postgresql/download.htmlSecond step to create an ODBC data sourceClick "Start-" control Panel-"Management tools-" data source (ODBC)-"User dsn-" Add "Write VBA code after the installation is configured.private Sub CommandButton1_Click () Dim CNN as New ADODB. Connection Dim rs as New A
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
Today, I wrote an Excel macro. When I create an Excel file based on a template, the content of some cells is automatically filled according to the current machine environment.
The writing is clumsy, because you are not familiar with VBA and office events, and you are all looking at help. If you can give me some advice, please leave a message.Private sub workbook
Principle:
The images inside the Excel document are Shape objects that Traverse ActiveSheet's Shapes collection;
Sets the corresponding Shape object to the temporary variable;
Add the ChartObject object to the current sheet and set the area size of the ChartObject object with the width and height of the shape that was taken previously;
Call the Copy method of the Shape object and copy it to the Clipboard;
Activates the prev
Tags: VBA SQL Server Excel VBA connects SQL Server database operations to Excel.Sub button 1_click ()Dim I As Integer, J As Integer, sht as Worksheet ' i,j As Integer variable, sht as an Excel sheet object variable, point to a worksheet' Dim cn as New ADODB. Connection ' Define the data link object, save the Connect
Two Problems of Delphi Excel operations using VBA:
1. Use the Excel column name to obtain the corresponding number of columns. For example, column A is 1st columns, column Z is 26th columns, and column AA is 27th columns.
ComplexAlgorithmBecause there are ready-made properties, as follows:
Columnnum: = worksheet. cells [1, 'a']. column;Columnnum: = workshee
On the day off, go to excel home to check what you can learn and help you with any questions. I have seen many posts asking for help in traversing files in a specific folder. Some friends said that the Excel version 03 has a filesearch object that can traverse files in the folder. In Version 07, there is no filesearch object and I do not know how to traverse the file. I think what version 03 can do, Version
Here I will directly on the source:Sub Export Txt1 () Dim file as String, arr, I ' defines the name of the text file = Thisworkbook.path "\ New salary table. txt" ' Determines if there is a text file with the same name, there is an antecedent delete if Dir (file The results of the operation are as follows:Above is written from Excel txt, my beam crooked an article is read from TXT and then written to Excel
The Excel workbook you manage has been modified by many people, many of which are often inconsistent, providing VBA code to implement one-click layout of tabular data format, eliminating the manual frequent adjustment of Excel data format.1 Option Explicit2 OptionBase13 4 SubAutoSet ()5 DimI as Integer6 7 fori =1 toSheets.count8 Sheets (i). Activate
Directory
Chart Export
Chart Format
Chart Lengend
Chart Protect
Chart Title
Chart
Chart Export
1. Save the chart in Excel to a picture in GIF format on your hard disk
Sub ExportChart() Dim myChart As Chart Set myChart=ActiveChart myChart.Export Filename:="C:\Chart.gif", Filtername:="GIF" End Sub
Theoretically charts can be saved to any type of picture file that readers can try for themselves.
2. Export a chart in
Source: http://blog.csdn.net/alexbnlee/article/details/6924207
1→ Implement the standard "open" dialog box and get the user's file name without actually opening any file. Obtain the file FullName.Expression. GetOpenFilename (FileFilter, FilterIndex, Title, ButtonText, MultiSelect)FileFilter: filter file Title: Title MultiSelect: You can select multiple
Sub Stop1 () Dim fileInformation As String Dim fi As Workbook fileInformation = Application. getOpenFilename (_ filefilter: = "
-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
(1) create a form in VBA, initialize its location, and call it...
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Sub CallForm ()UserForm1.Show 'display formUserForm1.Left = 600 'display positionUserForm1.Top = 180End SubPrivate Sub commandbutton#click ()CallForm 'callEnd Sub
(2) font color and background color of cells in Excel
Code
Code highlighti
1. Excel tools/macro/analysis tools/There are indeed similar functions in which the decimal number can be easily converted to binary. However, the fatal disadvantage of this function is that it can only be replaced.
-512 ~ An integer between 511 and beyond this range.
Therefore, we can only use VBA to write an available function.
2.2.alt + F11 orTool/macro/Visual Basic Editor/, Insert the module into the f
) " ":" "" Replace (MyRange (I, J), "" "", "" "" "" "" "If J
Recently in writing a Web page, need to query from the background of ASP Web pages to the MySQL recordset returned to the foreground ASP page, we know Ajax is not able to return from the background database recordset to the front page.
Looking at a lot of data, for the time being, it's a good choice to convert the recordset to a JSON-formatted stream, and then to import the Weboffice control's
I used VB6 Enterprise Edition to encapsulate a DLL, which has four VB forms: form1, form2, form3, form4, in VBE of excel 2003, class modules and standard modules in DLL are successfully called with VBA code, but VB forms cannot be called or displayed !!! How should I call it? To display ???The calling process is as follows: Open the excel worksheet and display fo
There are many ways to merge Excel workbooks. Examples of combining workbooks are described in "merging data from multiple workbooks into one Workbook. The following examples are provided for your reference.
For example, you need to merge worksheets from multiple Excel workbooks into one workbook. Assume that the workbook to be merged contains two worksheets in "D:/example/data record/Workbook". Now, use a
A problem that has been trapped for a long time has finally been solved. The requirement is that there are many pivot tables in Excel, the data source for each pivot table is the same, and I want to have one of these pivot tables linked together.For example, I have three pivot tables, and I want to change the month option for three tables to "2014-12". Check to find can only be implemented in VBA.The specific code is as follows: Public Subfilterpivott
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.