home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

vb 2005 with excell 2007

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2375
Discussions: 200,941, Posts: 2,379,265, Members: 246,304
Old May 23rd, 2009, 01:47 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Aug 2008
Posts: 41
Exclamation
vb 2005 with excell 2007

hi

I am developing a program which needs to take information from excel document.

Here is my code (I did not complete it yet)
__________________________________________________ _____________

Dim exc As New Excel.Application
Dim book As New Excel.Workbook
Dim sheet1 As New Excel.Worksheet

book = exc.Workbooks.Open("D:\book1.xls")
sheet1 = book.Worksheets("sheet1")
sheet1.Columns.Find("Trip")



exc.Visible = True


__________________________________________________ ________

when I run this code It gives me an exception in the statemet " Dim sheet1 As New Excel.Worksheet" saying:
Com exception was unhandled
Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154.


when I deleted the statement " Dim book As New Excel.Workbook" and ran the program, the exception raised in the same place (empty space)!

help will be greatly appreciated
Mostafa Nabil is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excell and hyperlinks Vagabond General Tech Discussion 4 May 11th, 2005 01:24 PM
Norton Internet Security 2005 / Norton System Works 2005 filipino Applications and Operating Systems 1 February 18th, 2005 04:38 AM
Excell Question Garysz Technical Support 2 October 22nd, 2004 09:30 PM
Excell Question mad1 General Tech Discussion 6 September 28th, 2003 05:19 PM
Excell autosum mad1 Applications and Operating Systems 5 January 28th, 2002 02:16 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2911)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Wireless Televisions. (8)
California Passes Anti-Flat-HDTV Le.. (43)
Regular Build (6)
Obama the Muslim (14)
Is the PSU I received dead? (11)
windows vista security holes (9)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (11)
Print spooler problem (13)
Foreign voltage (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Recent Discussions
sms storage to PC (0)
Regular Build (6)
Open With ..... Win7 (0)
java code for fibonacci (1)
screen resolution vs monitor size (0)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Partition Magic caused HDD problem (3)
Is the PSU I received dead? (11)
Have you switched yet? (85)
Point and Shoot Camera Suggestions. (2)
Modern Warfare 2 freeze (13)
Wireless Televisions. (8)
wireless user (1)
World's largest Monopoly Game using G.. (332)
Ideal cheap graph card for PC-Gaming? (17)
BIOS won't read disk when I try to fl.. (0)
Install XP pro and a Vista laptop ?? (11)
Graphics Card Upgrade Question (1)
favorit (1)
solutions for virtical white lines on.. (1)
Fire in DVD (2)
Modern Warfare For the PC (33)
radeon x850xt platinum & shader 3 (3)


All times are GMT -4. The time now is 01:45 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28