Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Questions for VB6

How can you connect to an Excel spread sheet via VB6 (not VBA) to retrieve
information from specfic cells?

Thanks,
Aaron


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Excel Questions for VB6

Aaron,

Big question. Essentially, it is the same as you would do from VBA. Create
an in stance of Excel, and then navigate through the Excel object model

Dim xlApp As Object
Dim xlWorkbook As Object
Dim xlSheet As Object

Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWorkbook = xlApp.Workbooks.Open("C:\myTest\myFile.xls")
Set xlSheet = xlWorkbook.Worksheets(1)
MsgBox xlSheet.Range("A1")

xlApp.Quit

Set xlApp = Nothing



--

HTH

Bob Phillips

"Aaron" <NONE wrote in message ...
How can you connect to an Excel spread sheet via VB6 (not VBA) to retrieve
information from specfic cells?

Thanks,
Aaron





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
View Questions and Answer to questions I created Roibn Taylor Excel Discussion (Misc queries) 4 July 24th 08 12:05 AM
Excel '07 Questions Geoff from LA Excel Discussion (Misc queries) 0 January 16th 08 04:28 PM
have several excel questions sheila joiner Excel Worksheet Functions 1 August 17th 06 07:03 AM
several excel questions gregp22 Excel Discussion (Misc queries) 0 March 19th 06 02:03 PM


All times are GMT +1. The time now is 08:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"