11 Replies - 596 Views - Last Post: 27 January 2014 - 12:41 PM Rate Topic: -----

#1 newbie999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-January 14

Opening an xls. file as a Resource

Posted 24 January 2014 - 12:04 PM

Hey, I'm very very new to VB and everything related to programming. So I'm going to apologize off the bat for my ignorance.
What I am looking to do is make a program that can launch different excel files based on the button function in a form. I have tried the standard Process.Start("file.xls"). This works, but I need the program to be published and placed on multiple computers and the file locations will change.

The other thing I tried was adding the xls. files as a resource. I published with the resources and the "Process.Start" code. But the program was unable to locate the files once it was installed on a new computer.

I have found many codes to open resource files for music and pictures, but not opening .xls files

Thanks in advance for any input

Is This A Good Question/Topic? 0
  • +

Replies To: Opening an xls. file as a Resource

#2 newbie999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-January 14

Re: Opening an xls. file as a Resource

Posted 24 January 2014 - 12:56 PM

-I'm currently using VB 2008 express

This post has been edited by andrewsw: 24 January 2014 - 12:58 PM
Reason for edit:: Removed self-quote

Was This Post Helpful? 0
  • +
  • -

#3 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 569
  • View blog
  • Posts: 2,546
  • Joined: 03-December 12

Re: Opening an xls. file as a Resource

Posted 24 January 2014 - 01:57 PM

Are you going to be using the same file? As in one copy across all computers, or do you need a copy of the file to be used where each computer has a separate file with the same name?
Was This Post Helpful? 0
  • +
  • -

#4 newbie999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-January 14

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 07:47 AM

I need the same file across all computers

Sorry for the late reply, don't have access to the internet on weekends.
Was This Post Helpful? 0
  • +
  • -

#5 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 569
  • View blog
  • Posts: 2,546
  • Joined: 03-December 12

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 08:43 AM

To utilize the same file across several computers you would need the file centrally located and point to the location in the program like a database. Outside of this and you are just working on copies of the file.
Was This Post Helpful? 0
  • +
  • -

#6 newbie999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-January 14

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 09:56 AM

View Postastonecipher, on 27 January 2014 - 08:43 AM, said:

To utilize the same file across several computers you would need the file centrally located and point to the location in the program like a database. Outside of this and you are just working on copies of the file.


Okay, would embedding the excel files as a reference be a solution?
Was This Post Helpful? 0
  • +
  • -

#7 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 569
  • View blog
  • Posts: 2,546
  • Joined: 03-December 12

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 09:58 AM

Then you will have a copy at each installation not a single file used by every user.
Was This Post Helpful? 0
  • +
  • -

#8 newbie999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-January 14

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 10:18 AM

View Postastonecipher, on 27 January 2014 - 09:58 AM, said:

Then you will have a copy at each installation not a single file used by every user.


Very true, I guess I could settle with making it "read only" so that each file cannot be tampered with (and remains to look like the same file on all computers). I can also have everyone independently update the file on their computers if the file does change.

I think the real question I'm facing than is how to link the buttons in my form to the .xls file in the reference so it opens.
Was This Post Helpful? 0
  • +
  • -

#9 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 569
  • View blog
  • Posts: 2,546
  • Joined: 03-December 12

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 10:38 AM

I would do something like this.
Was This Post Helpful? 1
  • +
  • -

#10 newbie999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-January 14

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 12:16 PM

View Postastonecipher, on 27 January 2014 - 10:38 AM, said:

I would do something like this.


That looks awesome, however I wasn't looking into spending any money on this project. The free version is sadly not an option because I have way more than 5 spreadsheets per workbook. Thanks for the link tho, really did look promising.
Was This Post Helpful? 0
  • +
  • -

#11 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 569
  • View blog
  • Posts: 2,546
  • Joined: 03-December 12

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 12:25 PM

I wasn't promoting the product. Look at the code and how it is done. You can figure out how to come up with ideas by looking at what has been done previously.
Was This Post Helpful? 1
  • +
  • -

#12 newbie999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-January 14

Re: Opening an xls. file as a Resource

Posted 27 January 2014 - 12:41 PM

View Postastonecipher, on 27 January 2014 - 12:25 PM, said:

I wasn't promoting the product. Look at the code and how it is done. You can figure out how to come up with ideas by looking at what has been done previously.


Thanks bud, after actually looking at the code, I think I got exactly what I need.
[Dim workbook = ExcelFile.Load("Workbook.xls")]
Simple enough code, shows the file I want to run, without using its location.
Thanks for the help, Ill test it out tonight.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1