How do I open existing excel document using vb6?

Reply

Join Date: Nov 2006
Posts: 1
Reputation: keks is an unknown quantity at this point 
Solved Threads: 0
keks keks is offline Offline
Newbie Poster

How do I open existing excel document using vb6?

 
0
  #1
Nov 14th, 2006
Hi

Could anyone please help me, I need to open an existing excel document using vb6. I only need to display the document.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: How do I open existing excel document using vb6?

 
0
  #2
Nov 14th, 2006
Hi,

If only for Display, Simplest Way would be,

Place and OLE Control on the form and give options this way,

* Create New
* Object Type : Microsoft Excel Work Sheet

To Display,

Private Sub cmdShowExcl_Click()
OLE1.CreateLink "C:\MyExclSheet.xls"
End Sub

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do I open existing excel document using vb6?

 
0
  #3
Nov 14th, 2006
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: How do I open existing excel document using vb6?

 
0
  #4
Nov 15th, 2006
Hi,

In OLE Control, Insert Microsoft Word Document
Rest Remains the same

If u still have problems mail me

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,154
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 530
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: How do I open existing excel document using vb6?

 
0
  #5
Nov 15th, 2006
you mean open excel and load the document

isnt there an exce command?

something like:

exec("C:\Programs\Offise\Exel\" , "C:\Docs\Spreadsheet123\)

something like this worked in VB5 , google it
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do I open existing excel document using vb6?

 
0
  #6
Nov 15th, 2006
Shell
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: How do I open existing excel document using vb6?

 
0
  #7
Nov 16th, 2006
Hi,

Yes the code u r hunting for is,

AppActivate Shell("C:\Program Files\Microsoft Office\Office\Excel.exe C:\MySheet.xls", vbMaximizedFocus)


Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do I open existing excel document using vb6?

 
0
  #8
Nov 18th, 2006
While this method will work, it is not the best way to go about doing it.... creating an object gives your application an infinite amount of control over the excel instance, whereas shelling excel only gives you control over opening it.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1
Reputation: staravi39 is an unknown quantity at this point 
Solved Threads: 0
staravi39 staravi39 is offline Offline
Newbie Poster

Re: How do I open existing excel document using vb6?

 
0
  #9
Mar 30th, 2007
Hi veena

Thank you very much

Regards

Ravi

Originally Posted by QVeen72 View Post
Hi,

In OLE Control, Insert Microsoft Word Document
Rest Remains the same

If u still have problems mail me

Regards
Veena
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC