Computing.Net > Forums > Programming > Opening specific files using vb

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Opening specific files using vb

Reply to Message Icon

Name: Hunter
Date: November 5, 2002 at 00:33:13 Pacific
OS: xp
CPU/Ram: 128
Comment:

Hi there!

I would like to open a specied file using vb.

I have 2 command buttons.

button A will open the file named "Sample.xls" on my local drive (c:\)
Button B will open the file "Sample2.xls" on a network drive (\\one\two)

Question:
what codes will i use to accomplish this?

Thank you very much in advance for those who will respond.




Sponsored Link
Ads by Google

Response Number 1
Name: mo
Date: November 5, 2002 at 00:46:59 Pacific
Reply:


loads of ways to do it,

put an ole object on your form, set the source doc to the one you want.

then put 'OLE1.Action = 7' behind a button click event

mo


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Opening specific files using vb

file open specific folder www.computing.net/answers/programming/file-open-specific-folder-/18852.html

Txt doc and Dat files using VB www.computing.net/answers/programming/txt-doc-and-dat-files-using-vb/16089.html

Opening htm files using VB6 www.computing.net/answers/programming/opening-htm-files-using-vb6/5347.html