Migrating modules from 98 to XP

  • Thread starter Thread starter mkingsley
  • Start date Start date
M

mkingsley

I have several VB modules that I have tried importing into an XP/Office
2003 environment, but can't get them to stay. In my old 98/Office 98
environment, the modules were always there, when I opened a new file
(PERSONAL.XLS), or any other file.

How do I get my modules to always be available whenever I open Excel.

Final note, when I imported them, I went to the VB editor to make sure
they were there, and made sure that the "Macros In" had checked "Open
in all Workbooks"

As always any help is appreciated

MK
 
What/where is ... "Macros In" had checked "Open in all Workbooks"


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Once Excel is open, and I have successfully imported the macro. I
choose (in Excel) Tools>Macro>Macros. And a window pops up showing
all macros. this window has the pull down menu: "Macros In", to
choose:

Open in all workbooks
This workbook
Book1

I have chosen "Open in all workbooks" because I want all macros
available no matter what Excel file I open.

thanx
 
Oh I see, that only determines which macros are shown in the list, not where
they can be run from. If you run macros in another workbook, you have to
qualify with that workbook name, or set a reference to it.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Thats probably the question I should have asked. So how do you set a
reference to the macros, and where are the macros actually stored??

Thanx for the help so far

Mkingsley
 
That depends upon where you store them. Most people will put them in their
Personal.xls workbook. In Excel, you can then reference functions like

=Personal.xls!myFunc(A1)

to access them in VBA, use

Application.Run "Personal.xls!test_msgbox"

or set a reference to the project via Tools>References in the VBIDE. You
might need to rename the project (in Properties) to access it in the list.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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