Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default macros changing to modules?

I have a workbook with a load of macros that i recorded and programmed
some time ago.
Recently, i began having problems with them running as usual....

I looked over the macro list and found that several of the maco's have
turned into modules.
The ones that have, have doubled themselves (module 3 and module 16).

The problem is that some references to the codes that have doubled
themselves are now changing.

Any reason for this?
I am having to go back and delete one, and rename the other one by
removing the term "module".

Any clues?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default macros changing to modules?

The only time I can think that macros would actually "turn into modules"
would be if you have upgraded from a rather old version of Excel (pre Excel
97 I think). Old Excel 4 macros were on "macro sheets" instead of in modules.
For more recent versions, macros are stored in modules, although if you've
only ever recorded and replayed them then you might not have been aware of
that.

If your macros were old-style Excel 4 macros, then the following articles
might help explain the change:

http://msdn.microsoft.com/archive/de...l/web/appa.asp

http://msdn.microsoft.com/archive/de...ml/web/001.asp

But assuming that they were created in Excel 97 or later...
A module is simply a holder for macros (and other sorts of procedures). If
you start up the Visual Basic Editor you'll be able to see all the modules in
your project (workbook) in a folder-like list on the side. Most of the time,
the module name doesn't really matter - the macro name is determined by the
Sub line in the code (eg Sub Macro1() indicates the beginning of a macro
called Macro1). There can be more than one macro in each module. The module
name does matter if you have more than one macro with the same name in the
same project (workbook) - then you need to use the module name as well as the
macro name to tell them apart (I'm guessing that's what's just happened to
you, and why you now see the module name when you didn't before). If all your
macros are recorded macros, they should all have had different names so the
module shouldn't matter (the macro recorder is generally clever enough to
default to a name that does not already exist, but if you type in a name then
you potentially could cause a double up). If you are now getting duplicates
of the same macro name in different modules appearing in your macro list,
then maybe one of the modules got copied (I don't know how that would happen
accidentally).
If you want more info, the following link is a bit of a guide to programming
in VBA - it was written for Office 97, but it seems to be a better beginner's
guide than the more recent stuff I've seen.
http://msdn.microsoft.com/archive/de...eb/FULLTOC.asp

"J.W. Aldridge" wrote:

I have a workbook with a load of macros that i recorded and programmed
some time ago.
Recently, i began having problems with them running as usual....

I looked over the macro list and found that several of the maco's have
turned into modules.
The ones that have, have doubled themselves (module 3 and module 16).

The problem is that some references to the codes that have doubled
themselves are now changing.

Any reason for this?
I am having to go back and delete one, and rename the other one by
removing the term "module".

Any clues?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Code Modules, PLEASE HELP ASAP!! PART 2 Brett Smith[_2_] Excel Programming 17 February 1st 06 07:26 AM
Changing code Modules, PLEASE HELP!! Brett Smith[_2_] Excel Programming 10 January 31st 06 01:30 PM
Managing Modules/Macros - More than one Module FOLDER? Hari Prasadh[_2_] Excel Programming 3 June 30th 05 02:17 PM
assigning variable across macros and modules Papa Jonah Excel Programming 1 October 25th 04 11:13 PM
Running Access MAcros or VB modules in Excel Nick Excel Programming 0 October 28th 03 06:27 AM


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"