Displaying posts filed under

VBA/ASP

Dec
23
2009

VBA function for multiple comparison

In SAS, lsmeans treatment /pdiff of PROC mixed or GLM output mean values and a matrix of probability values of all pair wise comparison. However, we have to create the traditional comparison table by ourselves. In order to automate the process, I developed a VBA function to do the job. The source code is the [...]

Nov
26
2009

Display stock charts on your own website

Plain stock chart
In searching an easy way to display stock charts on a web page hosted in a web server, two useful scripts were found on the internet:
1. Easy Yahoo stock chart ASP.NET Page
2. Displaying a daily chart for a ticker symbol
Even the scripts were written in different languages, they use a common idea that [...]

Sep
26
2009

Online Notetaker – an ASP web application

I use internet a lot. You might be, too. Do you have a need to write something down when you are online and want to access it later on? I do. That is why that I wrote this web application. I call it Online NoteTaker because it is running under Web server IIS 4.0/5.0. Although [...]

Sep
5
2009

Using Office Web Components to draw graphs on Excel userforms

The Office Web Components (OWC) are a series of components that you can add into a web page or any Office application. A typical use of the OWC in Office application is to add a graph in a user defined form. When I developed a userform for curve fitting, I’d like to see how good [...]

Aug
31
2009

Create an MS Access database by ASP VBScript

I’ve been dreaming of creating MS Access databases through VBScript for ASP server for a long time.  But I did not know how to create AutoNumber field. I spent two nights at home to write this vbscrip because I got a bad cold and did not go to office. At the beginning, I tried to [...]

Aug
27
2009

An example for generating experimental layout

Dr. Roe asked me to generate a pot map for her growth chamber experiments. Since she will do the experiments again and again. One fixed map is not good. I wrote some VBA code in Excel and create an Excel Add-in. This program can generate pot layout randomly. All you have to do is put [...]

Aug
27
2009

Extracting data from the searching results of citation database

Today (Sept. 25, 2002), my major advisor asked me to extract citation data from one text file he created and sent me through email. After I looked at the data, I realized that the data came from the citation databases, such as AGRICOLA, Biological Abstract, CAB, and so on. The requirements that you asked me [...]

Aug
27
2009

Search maximum and minimum of a function in a given range and its corresponding value of independent variable

More often, we need find the maximum or minimum value of a function within a given range. In Excel, we can develop a user-defined worksheet function to fulfill this goal. Here provides a user-defined function called minmax. This function is very powerful because it can be applied to any polynomial equation.
The definition of the [...]

Aug
27
2009

Estimation of confidence interval and predicted values of the dependent variable in a linear equation

Here provides a user-defined function to estimate predicted values of the dependent variable and corresponding confidence interval for a given dataset with linear relationship. The function definition is the following:
yhat(Y, X, XNew, CI, alpha)
Where, Y includes values of the dependent variable; X includes values of independent variables (can includes multiple columns (variables)); XNew includes new [...]

Aug
21
2009

A form used to pick up values from a worksheet

Excel VBA provides a handy control called RefEdit. If you put a RefEdit control on a modal form, you can easily pick up a range of cells in a worksheet. This is pretty useful when you design a complicated form to achieve a advanced function. However, you cannot use RefEdit control in the form if [...]