|
-
Jul 23rd, 2009, 02:55 PM
#1
Thread Starter
Fanatic Member
Show methods from Excel
Hi
I have a code below
Code:
Dim xlApp As Object
'Create an instance of Excel and add a workbook
Set xlApp = CreateObject("Excel.Application")
Set xlWb = xlApp.Workbooks.Add
Set xlWs = xlWb.Worksheets("Sheet1")
with xlApp
etc
end with
When I put dot inside with, It did not show methods
I look References and reference of the excel is right
tia
-
Jul 23rd, 2009, 03:42 PM
#2
-
Jul 23rd, 2009, 04:01 PM
#3
Re: Show methods from Excel
There is a link to the tutorial in my signature.
In this case all you need to do is declare the variables with their "proper" data types, eg:
Code:
Dim xlApp As Excel.Application
I recommend changing them back to "Object" (and removing the reference) before you compile the program.
-
Jul 24th, 2009, 08:07 AM
#4
Thread Starter
Fanatic Member
Re: Show methods from Excel
Very Thank You
But, How can I to do export only a column from recordset to Excel ?
-
Jul 24th, 2009, 01:28 PM
#5
Re: Show methods from Excel
If your recordset only contains that one column, the easiest way is CopyFromRecordset as shown in the tutorial.
If your recordset has other columns that you don't want to show, the easiest way is to loop the recordset, and use Cells or Range to put the values from that field into the worksheet.
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
|