|
-
May 9th, 2001, 11:48 AM
#1
Thread Starter
New Member
vb and excel
Please who can help me.....
I want simply: start excel, pase data in row and save in a excel file all this with vb6.....
Is there a very short way to do this ??
-
May 9th, 2001, 12:16 PM
#2
Junior Member
I like this... Excel
first, you have to add the references : Microsoft Excel 9.0 object library.
after, you just have to do something like this:
Dim ExApp As Excel.Application
Dim ExWbk As Excel.Workbook
Dim ExSheet As Excel.Worksheet
Dim ExRng As Excel.Range
Set ExApp = CreateObject("Excel.Application")
Set ExWbk = oXL.Workbooks.Add
Set ExSheet = oWB.ActiveSheet
ExSheet.Cells(1, 2).Value = "Excel"
ExApp.Visible = True
ExApp.UserControl = True
Set oExRng = Nothing
Set ExSheet = Nothing
Set ExWbk= Nothing
Set ExApp = Nothing
if you need help again... Just ask!!!
-
May 9th, 2001, 12:19 PM
#3
Junior Member
scuse me
scuse me... replace this:
Set ExApp = CreateObject("Excel.Application")
Set ExWbk = oXL.Workbooks.Add
Set ExSheet = oWB.ActiveSheet
by this
Set ExApp = CreateObject("Excel.Application")
Set ExWbk = ExApp.Workbooks.Add
Set ExSheet = ExWbk.ActiveSheet
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
|