Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
Dear everybody:
I want to add a personal.xls to a computer without such a fil automatically by Excel VBA, the problem is How can it figure out th location of xlstart folder that is in use? Looking forward to your help -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
Hi chrisrita,
You can use Application.StartupPath MP "chrisrita " a écrit dans le message de ... Dear everybody: I want to add a personal.xls to a computer without such a file automatically by Excel VBA, the problem is How can it figure out the location of xlstart folder that is in use? Looking forward to your help. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
Hi ....,
You can let Excel do it for you when you record a macro. After it has been added it would be like any other open file (I think, even though it is hidden). Didn't think you would like that answer so did a quick search perhaps this posting: http://groups.google.com/groups?thre...GP11.phx. gbl --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "chrisrita " wrote in message ... Dear everybody: I want to add a personal.xls to a computer without such a file automatically by Excel VBA, the problem is How can it figure out the location of xlstart folder that is in use? Looking forward to your help. --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
Guess my search techniques just failed me. You already
have two good answers before I could say mine stinks. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
you people are so kind and really good. thank you a lot. one mor
question to David, can macro automatically make another macro -- Message posted from http://www.ExcelForum.com |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
Do you mean to use VBA to create VBA code? If so, see some of the
examples at www.cpearson.com/excel/vbe.htm . -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "chrisrita " wrote in message ... you people are so kind and really good. thank you a lot. one more question to David, can macro automatically make another macro? --- Message posted from http://www.ExcelForum.com/ |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
Thank's Chip, I'm familiar with your vbe.htm but I guess not that
familiar that that would be the one to look for. I would have known it would be on your site though. But looking at why I was specifically asked about how to have a macro create code, I looked back at the earlier response of mine. So... Hi Chris/Rita, By letting Excel do the work for you I meant recording a macro, where you start recording (a macro) and do the things exactly like you want the macro to do, and the recorder does everything (usually) that can get you to the same result if you start with the same conditions and worksheet data. Unfortunately what is generated is very specific as exactly which cell is being changed, moved, etc. So by letting Excel do most of the work, the purpose is to see what instructions "might" be used and generally one wants to make their macro a lot more generic so that it can be used for a lot of different situations the more general, usually the better, because it means less work to do in the future. The real reason I indicated to record a macro though was so that the personal.xls workbook would be generated for you in the correct place meaning within the XLSTART directory. Once you have your personal.xls workbook (mine is actually named slightly differently), you can add modules and code to that manually -- that is what I really meant. Information on getting started with macros in Getting Started with Macros and User Defined Functions http://www.mvps.org/dmcritchie/excel/getstarted.htm Once you started working with macro, you might want something with additional information in it: Install Macros and User Defined Functions http://www.mvps.org/dmcritchie/excel/install.htm There is another kind of macro that is triggered on an event such as manually entering data into a cell, switching worksheets, selecting a cell, double clicking a cell, right-click, and more. Event Macros, Worksheet Events and Workbook Events http://www.mvps.org/dmcritchie/excel/event.htm --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Chip Pearson" wrote .. Do you mean to use VBA to create VBA code? If so, see some of the examples at www.cpearson.com/excel/vbe.htm . "chrisrita " wrote ... you people are so kind and really good. thank you a lot. one more question to David, can macro automatically make another macro? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
Thanks, David, Chip and Michel.
I developed a code that is useful to my work and some of my colleague asked me for it. In order to install the function into others computers i wrote another macro that can automatically add the code a well as a button to their excels. Since the code is designed to b added to the personal.xls which does not exist for every computer, have to have the macro find out the xlstart folder so as to add th file. Michel's solution fits my macro the best. and Michel figures ou a brand new way that I will learn and try later. Millions of thanks t David for your warm help and illumination. Chri -- Message posted from http://www.ExcelForum.com |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the xlstart folder
Hi Chris,
Now that I know it is for other people, I think you would just install your workbook into the XLSTART folder. I don't know if that is what you originally had in mind and our replies just kept leading away from the actual goal. Out replies were to updating the personal.xls workbook. Since this is for others you don't want to touch their file. If this is for a larger group you might want to distribute it as an add-in. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "chrisrita " wrote... Thanks, David, Chip and Michel. I developed a code that is useful to my work and some of my colleagues asked me for it. In order to install the function into others' computers i wrote another macro that can automatically add the code as well as a button to their excels. Since the code is designed to be added to the personal.xls which does not exist for every computer, i have to have the macro find out the xlstart folder so as to add the file. Michel's solution fits my macro the best. and Michel figures out a brand new way that I will learn and try later. Millions of thanks to David for your warm help and illumination. Chris --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding a file to xlstart folder. | Excel Discussion (Misc queries) | |||
XLStart folder,read only | Excel Discussion (Misc queries) | |||
XLSTART Folder Location | Excel Discussion (Misc queries) | |||
Book1.xlt in XLSTART folder | Excel Worksheet Functions | |||
XLStart folder content deleted when upgrading to XP | Excel Programming |