Solved

How to open target file from form

Posted on 2009-05-06
2
355 Views
Last Modified: 2013-11-25
Hello,

I have A program which contains a combo box that has a value which is a link to a local file. I want the user to be able to open this file when they click a button.

Previously I have done this in VBA using Application.FollowHyperlink Me.txtAuth. Is there a way to do this in VB.NET?

The target file is a .TIF I've read a bit on using a file browser to complete this but I want it to open the file selected on the form, rather than browsing for it.

Thanks in Advance!
0
Comment
Question by:c9k9h
2 Comments
 

Accepted Solution

by:
c9k9h earned 0 total points
ID: 24318068
Nevermind, Got it


 Dim myprocess As New Process
        myprocess.StartInfo.FileName = Me.cboForm.SelectedValue
        myprocess.Start()
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 24318640
...or simply:

    Process.Start(Me.cboForm.SelectedValue)
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video discusses moving either the default database or any database to a new volume.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now