|
-
May 6th, 2000, 01:04 PM
#1
Thread Starter
Conquistador
How would i open an instance of excel, all through my program, then populate a sheet with say
a table like this :
Name | Eye COlor | Nickname | Etc
---------------------------------
David|Blue |Da_Silvy | Etc
and then print it out
does anyone know?
-
May 6th, 2000, 02:48 PM
#2
Thread Starter
Conquistador
-
May 6th, 2000, 05:34 PM
#3
New Member
Excel Automation
Hi David
First you have to reference the Excel library in Projects/Reference Menu in VB6.
Then you create a ExcelApp Object and a Worksheet object.
The Worksheet Object has a Cells or a Range object that you can manipulate.
Try the following code:
Dim objExcel as Excel.Application
Set objExcel = New Excel.Application
objExcel.Visible = True
objExcel.SheetsInNewWorkbook = 1
objExcel.Workbooks.Add
With objExcel.ActiveSheet
.Range("A1").value = "Heading 1"
.Range("B1").value = "Data 1"
etc, etc,etc....
End With
-
May 6th, 2000, 06:40 PM
#4
Thread Starter
Conquistador
thank you very much
-
May 11th, 2000, 02:37 PM
#5
Thread Starter
Conquistador
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|