Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

excel v.b.a macro

Posted on 2002-06-18
5
Medium Priority
?
292 Views
Last Modified: 2010-05-02
Hello

At excel version 97 I could create a macro and run it from any excel file (if I used the special option when creating it), but I didn't have to open the file containg the macro.
However, in excel 2000  I have to open the file containing the macro I want to run.
Isn't there a way of running a macro created in excel 2000 without opening the file containg it.

Thanks in advance
Erez
0
Comment
Question by:erez_bat
  • 3
  • 2
5 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 7088399
In excel 97 you probably placed all of your macros in  "Personal.xls" which is automatically loaded by default and the spreadsheet portion of this file is marked as hidden so not displayed. This allows your macro to be run regardless as this spreadsheet is always loaded when you run excel. You can still do this with excel 2000, either create a personal.xls in your default folder (this is set on the general tab of the tools,options dialog) or just record a dummy macro and change the "Store Macro In" combobox value to "Personal Macro Workbook". This will create a new Personal.xls which will be automatically loaded in future and your macros will then be available.
0
 

Author Comment

by:erez_bat
ID: 7088637
In the second way you say to change the combo-box value,
but this combobox is not editable.(Or I might be reffering to another combo-box).
The combo-box I see in the macro windo prompts you to choose which macros to display:
Those on the current file/on all current workbooks  
However it is not editable.

0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7088684
If you click Tools, Macros, Record new macro in the middle of the dialog that is displayed is a check box and next to it a combo box, drop down the list and change the value from the default which is "This Workbook" to "Personal Macro Workbook" then the macro that you record is saved into this template workbook. If you always ensure that your macros are recorded/written/saved into this workbook then they will be available to all other workbooks that you open.
0
 

Author Comment

by:erez_bat
ID: 7088852
o.k
but if i want to edit the macro and write script, than I am forbidden of doing it, because the file is hidden
Is it names personal.xls>
How can I show him (cancel the hidden status ?), so I can edit the macro ?
 

0
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 7088915
You just need to open the VB Editor: Tools, Macro, Visual Basic Editor (Or press Alt+F11) and the Personal.xls workbook is displayed in the project explorer, open the Modules folder displayed and double-click module1 where your recorded macro is placed. You can continue to modify or create new scripts here.
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question