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 9042075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:23:45+00:00 2026-06-16T10:23:45+00:00

Currently I am using hard-code PATH to a .EXCEL file in my Scripting language,Like

  • 0

Currently I am using hard-code PATH to a .EXCEL file in my Scripting language,Like as below:

    Set objExcel1 = CreateObject("Excel.Application")
    strPathExcel1 = "D:\VA\GE_Wing_To_Wing_Report.xlsx"
    Set objWB = objExcel1.Workbooks.open(strPathExcel1)

In VBScript is there any way to get such "D:\VA\ full path to any file on run-time?So that I can remove such hard-code from my script.

Thanks,

  • 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-16T10:23:48+00:00Added an answer on June 16, 2026 at 10:23 am

    You can use a filebrowser like the other answer suggests or an inputbox but both are anoying for the user, you could refer to just the filename without path if you put the excel file in the same map as the script, you can put this in a configuration file that you load in your main script or page or last you could give it to your script as a parameter which you can give in a console command or in a shortcut. let me know which you prefer, then i can give you an example.

    EDIT: as promised, actually in the case of Excel it is a bit harder but not impossible, see this example

    Set objExcel1 = CreateObject("Excel.Application")
    objExcel1.visible = true
    strPathExcel1 = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".") & "\GE_Wing_To_Wing_Report.xlsx"
    Set objWB = objExcel1.Workbooks.open(strPathExcel1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently using android NDK to write some native code in C. I have
We're currently using the following for creating US dollar values in our web application:
heres what I'm currently using: Rails -v 3.2.3 I'm trying to make a path
I am able to get the web path to the file like so: $filename
hi i am using a code to add a sql file to my database
For a web application I'm currently working on, I want to download a file
I'm currently working with some code involving saving a file to a user-defined file.
I'd like to start using unit tests, but I'm having a hard time understanding
I am currently using this code to input data from numerous files into R:
Currently using the HTTPServletRequest class and specifically the .getQueryString method to retrieve an inputted

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.