Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 10th, 2005, 06:13 AM
Authorized User
Join Date: Sep 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default selecting records from excel


Im having some troubles talking to excel from my vb addin I made.
This code to send data to excel from a db works great:

Dim xlApp As Excel.Application
Dim xlWb As Workbook
Dim xlWs As Worksheet

Set xlApp = CreateObject("Excel.Application")
Set xlWb = xlApp.Workbooks.Add
Set xlWs = xlWb.Worksheets("Sheet1")

Now im now trying to pick up the changes and send it back from the active excel workbook, I cant seem to reference the active workbook...
This is the code im using:

Dim xlApp As Excel.Application
Dim xlWb As Workbook
Dim xlWs As Worksheet

Set xlApp = CreateObject("Excel.Application")
Set xlWb = xlApp.ActiveWorkbook
Set xlWs = xlWb.ActiveSheet

Any ideas from anyone ?

Thanks andy...
Reply With Quote
  #2 (permalink)  
Old January 12th, 2005, 12:18 PM
Friend of Wrox
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

What happens when you try this?
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting records in a query firefighter2045 Access VBA 5 August 28th, 2008 08:14 AM
Selecting one of possibly many related records rodmcleay SQL Server 2000 2 March 24th, 2007 12:49 AM
selecting records from multiple tables cygnusx04 Classic ASP Databases 1 October 28th, 2004 05:36 AM
Selecting the Latest Records gordbro Access 3 September 16th, 2004 07:21 PM
ASP - Selecting Multiple Records Ei0nN Classic ASP Databases 2 May 28th, 2004 03:38 PM

All times are GMT -4. The time now is 04:17 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.