Error - template LAYOUT-DATA-WRAPPER not found

A configuration error was detected in the CGI script; the LAYOUT-DATA-WRAPPER template could not be found.

Error - template STYLE-SHEET not found

A configuration error was detected in the CGI script; the STYLE-SHEET template could not be found.

Error - template SUB-TOP-BANNER not found

A configuration error was detected in the CGI script; the SUB-TOP-BANNER template could not be found.
Subject:
From:
A&C Thompson <[log in to unmask]>
Reply To:
PCSOFT - Personal Computer software discussion list <[log in to unmask]>
Date:
Mon, 24 Mar 2003 21:55:52 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
----- Original Message -----
From: "Aftab Ahmed"
Subject: [PCSOFT] Automating Excel


> To automate Excel how would you call an Excel defined function eg Histogram (found under tools, data analysis) in
a VBA procedure (with all its parameters)?
> Any help provided would be appreciated
> Aumor


Below is a snippet from the only project I had to do that had anything to do with automating Excel. I don't know if
it will help you, but what this did was open Excel, do a bunch of calculations (distance.xls), then it put the data
into my program and closed Excel - all without ever seeing Excel. hth

Al Thompson

Private Sub cmdConvert_Click()
Set xlapp = CreateObject("excel.application")
Set xlbook = xlapp.Workbooks.Open("C:\Distance.xls")
Set xlsheet = xlbook.Worksheets(1)
xlapp.Visible = False

xlsheet.Cells(1, 3) = Val(txtPreferred.Text)

xlsheet.Cells(6, 2).GoalSeek Goal:=xlsheet.Cells(1, 3), _
changingcell:=xlsheet.Cells(1, 2)

txtFound.Text = Format(xlsheet.Cells(6, 2).Value, "#,###.00")

xlapp.DisplayAlerts = False
xlapp.Quit

End Sub

                Curious about the people moderating your
                   messages? Visit our staff web site:
                    http://freepctech.com/staff.shtml

ATOM RSS1 RSS2

LISTSERV.ICORS.ORG Secured by F-Secure Anti-Virus CataList Email List Search Powered by LISTSERV