dumb macro question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I record a macro and save it in Personal macros, will it still work if I
email the file to another person? I am going to make it that the macro works
when they click a picture on the worksheet itself.

What if I save the macro in that file and email it to someone....they will
be changing the name of the file, will that disable the macro?
 
Personal.xls means just that. So, unless you also send that file (which they
may not appreciate) then I suggest you put the macro in the file it works
on. As to the name change, it depends. Post your macro.
 
Record the macro in the workbook, not Personal.xls or you would have to send
that also.

Unless you have a hard-coded workbook name and/or path in your macro, it should
work on other person's computer.


Gord Dibben MS Excel MVP
 
Like Don and Gord suggested, you could put the macro in the workbook that
contains the data.

But (just a suggestion), if this macro is pretty generic and will (or could) be
used in lots of workbooks, you could create a CarreraUtils.xls workbook that
contains just the code--no data at all.

Then if the code needs to get updated (it will someday!), you just update the
CarreraUtils.xls file and send it out. You don't have to worry about having
100's of workbooks with the old code that's out of date.

And when you get lots of macros you want to share with others, you'll want to
give them a way to access them--besides Tools|Macro|macros.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)
 
And just to add to both Don and Gord's reply (again).

The reason you don't want to call the workbook you share with others
"personal.xls" is that if those users have any macros, they could have used that
name.

And excel will only allow one workbook with that name open at any one time. You
wouldn't want them to have to make a choice--or irritate them by having to close
their workbook before they could open yours.
 
Thanks for all your answers, but most of it was over my head.

I don't know how to write a macro, I just record them.

In this case, I'll have a password protected workbook, and the macro will
delete the contents of the unlocked cells, as the users will be using it as a
form, which they send to me weekly.

I have no control over their renaming the file.

The people who will be filling in the unlocked cells do not often sit down
at a computer, and I'm trying to make it as easy for them as possible.

From what I'm getting here, I should save the macro to just that workbook?
 
See in-line........

Thanks for all your answers, but most of it was over my head.

I don't know how to write a macro, I just record them.

When recording you have the choice of which workbook to record
to..............This Workbook or Personal Macro Workbook or New Workbook
In this case, I'll have a password protected workbook, and the macro will
delete the contents of the unlocked cells, as the users will be using it as a
form, which they send to me weekly.

Note: protecting the workbook will not lock cells.

You must protect the worksheet with the cells in question formatted as
"unlocked"
I have no control over their renaming the file.

Should not matter if they change the name if it is not hard-coded in the macro.
The people who will be filling in the unlocked cells do not often sit down
at a computer, and I'm trying to make it as easy for them as possible.

From what I'm getting here, I should save the macro to just that workbook?

I would say yes.


Gord
 
As I explained in my last response, I'm not knowledgeable with writing code
for macros....so I don't know what you mean by a "hard coded" file name.

I understand you are an MVP and quite knowledgeable, but it doesn't really
help to say "See in-line....." when part of what you said is not something
I'm familiar with.

I feel my last question was slightly different from my first, as far as the
people I will be sending this to changing the name.

I don't feel it would take that much more of your time to answer that
specifically, rather than referring me back to an answer I didn't fully
understand.
Thanks in Advance for answering the question I just asked...
 
We are all volunteers here and your comments about the quality and methods of my
attempts to assist show a bit of impatience on your part.

My time is mine and how I allocate it is up to me.

Got that off my chest.............now to answer.

When you click on Tools>Macro>Record New Macro a dialog will open.

In that dialog is a "Store Macro In"

Select This Workbook then record the macro.

Send the workbook to your users.

They can change the name and your macro(s) will still work.

"hard-coded" means a reference in your macro to a specific filename or sheetname
which could get changed.

In that case, the macro would error out.


Gord



As I explained in my last response, I'm not knowledgeable with writing code
for macros....so I don't know what you mean by a "hard coded" file name.

I understand you are an MVP and quite knowledgeable, but it doesn't really
help to say "See in-line....." when part of what you said is not something
I'm familiar with.

I feel my last question was slightly different from my first, as far as the
people I will be sending this to changing the name.

I don't feel it would take that much more of your time to answer that
specifically, rather than referring me back to an answer I didn't fully
understand.
Thanks in Advance for answering the question I just asked...
 
I am fully aware you are a volunteer, however, if one cannot answer a
question properly, without refererencing back to material which the
questioner did not understand, it sounds like you are either showing off or
belittling the other. I'm not impatient, but I don't expect to be given
answers that are flip.
How you allocate your time is your business, if you choose not to answer my
questions, that's fine with me.
Believe me, I have no desire to go near your chest.
As far as comments about quality and methods, the nature of volunteering is
to help..constructive criticism only serves to enable the volunteer to do a
better job of what they are here freely to give.

As far as your latest answer...Thank You, it answered my question.
 
Which my very first post and second post did.

In both of those I stated save the macro in the workbook.


Gord
 
Don Guillett wrote "Good luck in getting a lot more help around here."

My, you think a lot of yourself, don't you?

I guess it would be much too hard for me or someone else you've taken a
dislike towards to figure out how to come in under a different user name.

How would the world function without you and Gord?

I hope we never have to find out.

pompous ass.
 
It's the latest round of pharmaceuticals Don.

Making me stupider(believe me, it's possible!) and more mellow.


Gord
 
Back
Top