Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:02:48+00:00 2026-06-07T06:02:48+00:00

VB.NET level: Beginner I made a .exe using VB.NET. In this program there are

  • 0

VB.NET level: Beginner

I made a .exe using VB.NET. In this program there are many links to excel files (There are specific folders for excel files).

My problem:

Consider an excel file named as abc.xlsx, which is on my home pc. Link to this file is as follows,
D:\work\data\abc.xlsx

now for obvious reasons, this link will not be valid when I run the .exe on my work pc.
(Later I want to run this .exe on multiple pc’s)

How to solve this issue?

My thinking is to create a dynamic link which will update itself based on pc in use or to create a constant link which is independent of pc in use.

Help will be really appreciated.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:02:49+00:00Added an answer on June 7, 2026 at 6:02 am

    so make the path relative to the .exe

    C:\myapp\myapp.exe
    c:\myapp\data\abc.xslx
    …

    So no matter where you app is, you can get to your data like this

    Dim dataFolder As String = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly(‌​).Location)
    dataFolder = System.IO.Path.Combine(dataFolder,"data")
    Dim theFileIwant as String = System.IO.Path.Combine(datafolder,"abc.xslx")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a beginner level question for asp.net MVC I have the following code
Is there an API to get the current ASP.NET Trust Level?
I have an ASP.NET website where i have implemented page level caching using the
I've been looking into implementing caching at Repository level using the .NET 4.0 Caching
I have a beginner level Json question with MVC.net (I've never really used jquery
I am entry level .Net developer and using it to develop web sites. I
I'm an absolute beginner with ASP.NET[MVC] so this is probably a dumb question. I
I have a asp.net sitemap with single level dropdown menu. I am using following
I am using forms authentication with ASP.NET MVC. Within web.config at application level I
see on jsfiddle. http://jsfiddle.net/yNJKj/13/ This regex is supposed to show only top level items.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.