Solved

excel v.b.a macro

Posted on 2002-06-18
5
283 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 50 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now