MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

How do I change the name of a module?

  Asked By: Pedro    Date: Jan 24    Category: MS Office    Views: 1182

I have 2 questions, actually:

(1) How do I rename a module?

I have an application in which the VBA modules
are "Module1", "Module2", etc. I know in the past I've been able to
rename the modules, but for the life of me I can't remember how I
did it.

I was hoping the recent rename-the-workbook discussion would make it
clear to me, but it didn't. How do I rename a Module?

(2) How do I stop Excel from applying a date format to "4-1"?

I frequently copy and paste odds information into a blank sheet.
The odds are in the form, "4-1" or "5-2". Excel treats "15-1" fine,
but "4-1" is immediately converted to "1-Apr". "5-2" becomes "2-

It appears the only way I can avoid this is to remember to pre-
format the cells as Text. If I wait until after I've pasted the
data with the odds, I can't get back to "4-1". (going to Text will
just put in the "39500" form of the date.) Preformatting everything
as Text isn't ideal, either, because some of the columns will have
numbers that I will want to work with.

Is there any way to turn Excel's 'this-must-be-a-date' assumption
off for the hyphenated form?



2 Answers Found

Answer #1    Answered By: Daniel Costa     Answered On: Jan 24

Answer to question 1
Select the module  then hit the F4 key.
There is also a button on the menu bar of a hand pointing at an index card
Or go to View/”Properties Window”

Answer to question 2
Copy your field from the other workbook
Paste using Edit/Paste Special (Values)

Answer #2    Answered By: Grace Ellis     Answered On: Jan 24

Answer #2
He didn't say that he was copying from Excel!
In fact, if he WAS copying from Excel to Excel,
the default would be to copy  his formatting.
Therefore I conclude that he's copying his "odds" data from another source.
I thought his problem was with autoformating, but
changing it to "none" didn't solve the problem.

Didn't find what you were looking for? Find more on How do I change the name of a module? Or get search suggestion and latest updates.