Excel 2007 VBA How can I install my spreadsheet in a user director

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a generic program that will autoexecute and load my spreadsheet into
a user directory, offering the user an opportunity to browse their hard drive?
 
Not sure what you are asking...

- You want an Installer to copy a specific Excel file to a specific location
?
Plenty of installers available, Inno etc
- You want to allow the user to select a file:
Application.GetOpenFileName

NickHK
 
Is there some standard, existing software that will install my program from
CD to the user's hard drive?
 
Well a batch file would do it. If you are talking about a single Excel
workbook, it shouldn't be that difficult.
Otherwise one of the installer apps can be configured to install various
components and register them etc.
If you have an Autorun file on the CD, it can execute when the CD is
inserted.

So I guess the answer is Yes, there is existing software to do the
installation, but have to configure it.
http://www.google.co.uk/search?hl=en&q=windows+installers&btnG=Google+Search&meta=

But none of this is really an Excel situation, unless you are asking how to
do it in VBA.

NickHK
 
Nick, Thanks for your responses. I have not been too clear about my
question because I only have a fuzzy idea myself. I will try to sharpen my
query:

I have a single spreadsheet with VBA macros. I want to place this on a CD.
I want the CD to autorun on another user's computer and install in his/her
excel directory. I just want the simplest way to accomplish this.
 
Thanks, Nick, for spending time on my problems. It is vey kind of you to
loan me your brain.
 
Unless anyone has a better idea:

<AutoRun.inf>
[autorun]
ShellExecute=Install.bat
</AutoRun.inf>

<Install.bat>
copy NewWS.xls C:\NewWS.xls
</Install.bat>

You can user other DOS elements (like %userprofile% etc) in the batch file,
although I don't see how you can get the Excel folder, but admittedly I know
very little about this bat file stuff.

You could always open the Excel file from the Autorun instead:
<AutoRun.inf>
[autorun]
ShellExecute=NewWS.xls
</AutoRun.inf>

and any code in its Workbook_Open event would run. From here you could get
the:
Application.StartupPath
Application.DefaultFilePath

Then do a .SaveCopyAs and then open the copy, whilst you close this WB.
This may not work depending on the users Excel security setting though.

NickHK
 
Thanks, Nick. I have copied much of your information into Word, where I can
refer to it at my leisure.
--
TomThumb


NickHK said:
Unless anyone has a better idea:

<AutoRun.inf>
[autorun]
ShellExecute=Install.bat
</AutoRun.inf>

<Install.bat>
copy NewWS.xls C:\NewWS.xls
</Install.bat>

You can user other DOS elements (like %userprofile% etc) in the batch file,
although I don't see how you can get the Excel folder, but admittedly I know
very little about this bat file stuff.

You could always open the Excel file from the Autorun instead:
<AutoRun.inf>
[autorun]
ShellExecute=NewWS.xls
</AutoRun.inf>

and any code in its Workbook_Open event would run. From here you could get
the:
Application.StartupPath
Application.DefaultFilePath

Then do a .SaveCopyAs and then open the copy, whilst you close this WB.
This may not work depending on the users Excel security setting though.

NickHK

NickHK said:
Start here:
http://www.phdcc.com/shellrun/autorun.htm
http://www.cryer.co.uk/brian/windows/howtocacdtwar.htm

I haven't used autoRun much, so can't say much really.
Check the link at the bottom of the second site to avoid burning/testing
many CDs.

NickHK


http://www.google.co.uk/search?hl=en&q=windows+installers&btnG=Google+Search&meta= how
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top