Results 1 to 7 of 7

Thread: navigation to excel file with web browser

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    12

    navigation to excel file with web browser

    Greetings,

    New to VB 2008, and VB in general, but loving it so far. I am using a web browser in an MDI window to access an a few excel files with some buttons to call some macros. Right now the excel templates I am using are just in a folder on our server. I am navigating to the files using \\servername\folder\...\...\filename.xlt I would like to associate them with the application so that if i install this somewhere without server access the program will still function.

    Thoughts?

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: navigation to excel file with web browser

    Why not using an OpenFileDialog to allow the user to pick the file they want to open? Or use a FolderBrowserDialog to let the user pick a folder and then you show a list of the (excel) files in that folder in a listbox where the user can open each file by click by click on it?
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    12

    Re: navigation to excel file with web browser

    mainly asthetics, they are clicking a button to choose to create a new work order that is the same file every time. And even if i use an open dialog box it still doesnt solve the issue of me installing the app say at another facility that doenst have access to the server, but still having the necessary files to run the program. Is that more clear?

  4. #4
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: navigation to excel file with web browser

    Well, you then need to have a setting for your application where the user can set the path to that excel file when they first run it. What I'd do is:
    1. Set the path pointing to the file on the server as the default path
    2. On app startup, test if the file exists. If it does, no further action is needed. However, if the file does not exist, you will show a openfiledialog for the user to specify where the file is, you then save that new path to your app settings.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    12

    Re: navigation to excel file with web browser

    theres no way to have the file attached to the installation so that when the app is installed it can put the file in a C:\Program Files\ app name folder then access the file form there? isn't that what most applications do?

  6. #6
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: navigation to excel file with web browser

    No... Most application will attach a file in the same directory of the exe or some sub directory within the directory of the exe and will programatically refer to the attached file using relative path of the exe (Application.StartUpPath). That way, it doesn't matter where the user install the app, it still can find the file.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  7. #7

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    12

    Re: navigation to excel file with web browser

    could you explain that in more detail, that sounds like exactly what I want to accomplish

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width