Modules to be used for several different spreadsheets

  • Thread starter Thread starter Kelly
  • Start date Start date
K

Kelly

Yesterday I found the proper name case module in this discussion thread. It
works, however I am having a hard time when I try to run this module on
different spreadsheets. Is there a way that I can save the module and pick
it up and use it when I need to (kind of like a macro)? Any help would be
greatly appreciated !!

Thanks for any help in advance.
 
you could copy it into personal.xls and then attach it to a toolbar
button - then it would be available to any spreadsheet you use.
you may need to fix coding regarding sheet names if they are specified
- post your code if you want somebody to look at it in order to make
it more general.
:)
susan
 
OK, can you explain that a bit further, I am really new to the modules.
Thanks !!!
 
This is the code I am wanting to use for many spreadsheets that we have
imported.

Sub Proper()
Dim Cell As Range
Application.ScreenUpdating = False
For Each Cell In Selection
Cell.Formula = Application.Proper(Cell.Formula)
Next
Application.ScreenUpdating = True
End Sub

So I would LOVE to have a toolbar button to use. If I can't get the
toolbar, just being able to go to a saved module somewhere and click it when
I need to use it would be great. Again, sorry I am new to all this (codes,
modules etc...) but any help would be appreciated.

Thanks
 
if you have the workbook open that currently contains the module, in
the VBA editor you will see the name of that workbook, and the name of
"Personal.xls". drag the module to the personal.xls & it will place a
copy there. if you want, delete the original from the first workbook.
then, in the excel workbook, right click up in the toolbars and choose
"customize". under "commands" go to "macros" & you will see a yellow
smilie face called custom button. drag that up into your toolbars
wherever you want it. right click the new yellow smilie face and
"assign macro", choosing the one in the personal.xls. then click
"close".
now that button will run that macro whenever you click on it.

if you don't see personal.xls, that means one hasn't been created
yet. record a simple macro & choose that it be stored in your
personal.xls, and that will create it. you can always delete the
simple macro afterwards.

again, post your code if it needs to be made more general (without
specific sheet names, etc.).
hope that helps
:)
susan
 
That is good news. So when you say save it to personal.xls, I don't
understand how that can help me to open up another spreadsheet but use the
personal module, sorry for not understanding this.
 
personal.xls is available all the time, no matter what spreadsheet you
have open. the toolbar button will also be available all the time, no
matter what spreadsheet you have open. when you assign a button to a
module stored in personal.xls, you will always have it available. i
don't know how to explain it better than that! :) try it, you'll
see. once you get it set up, close the VBA editor, and close your
current spreadsheet. close excel & say yes to saving changes to
personal.xls. now open excel and open some other spreadsheet. type
something in a cell in all caps (or all lower case). select that text
cell and press your smilie face button. it should change it to proper
case.
like i said, i don't know how else to explain it.
:)
susan
 
Personal.xls is located in the XLStart directory, and is used to store
macros and
things that you want to be available to all workbooks, whenever you start
Excel.

You can create it by
- goto Tools>Macros>Record New Macro...
- Choose Personal Macro Workbook form the dropdown
- OK
- click the Stop button on the toolbar that pops-up

You now have a Personal.xls workbook. It is not visible though, it is hidden
by default (Windows>Unhide)
 

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