MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 13th, 2002, 12:13 AM   #1
chookers
 
Join Date: Mar 2002
Posts: 115
Default

Hello, I have been working on my macro storage problem and I have noticed that the problem I was having of my macro button reassigning itself to the latest document based on the template (i.e. it would reassign itself from "template" to "Document1" and if "Document1" was ever deleted, the macro couldn't find the code and wouldn't work) and not staying with the template itself, does not happen if the macro is stored in Personal.xls (I had it in This workbook and I also tried all open workbooks with the same result)

I would love to understand why this is so, but barring that I would love to know if Personal.xls is an appropriate place to put macros that I need to have be used on other people's computers. I have to email the template out to a few different people, should this work?

Thanks for any clues! Excel help is hopeless on this subject I'm sorry to say.

Cheers!
chookers is offline   Reply With Quote
Old May 13th, 2002, 12:24 AM   #2
Tom Schreiner
 
Join Date: Mar 2002
Posts: 6,680
Default

Your personal macro workbook will remain on your computer.
You may want to import the module(s) you need into each new workbook created from your template.
Tom
Tom Schreiner is offline   Reply With Quote
Old May 13th, 2002, 12:37 AM   #3
chookers
 
Join Date: Mar 2002
Posts: 115
Default

Testing to see if this posts, my last one didn't.
chookers is offline   Reply With Quote
Old May 13th, 2002, 12:51 AM   #4
chookers
 
Join Date: Mar 2002
Posts: 115
Default

Jeez I have lost 3 messages so far! Well let me try this one more time...

I was afraid someone was going to tell me that. The trouble is that when I assign it to "This workbook" or "all open workbooks" The macro button doesn't STAY assigned to the template, it reassigns itself to the last document I used based on the template. So I can send out this worksheet template with the toolbar, but as soon as a party on the other end goes to press the macro button is says it can't find "Document1" or whatever I've called it, which is here on my computer. There must be a way to make it stay with the template so when someone uses it it doesn't have to be reassigned to the template everytime? Sweet Jesus I have looked everywhere for a solution to this and can't find one!!!

Any other ideas?
chookers is offline   Reply With Quote
Old May 13th, 2002, 01:36 AM   #5
Tom Schreiner
 
Join Date: Mar 2002
Posts: 6,680
Default

Hi Snookers...
I just created a template with a forms button and saved a copy as an Excel Workbook.
The macro followed and changed it's reference/name automatically...
The original template was unaffected...
We're missing something here?
The only thing I can come up with is you are using a macro from another workbook in your original template.
Open your original template, right click on your button, choose assign macro. Make sure the macro assigned is in your current template. The filename should precede the macro name. Ex. TemplateTemp1!Button3_Click
The filename is TemplateTemp1
The macro name is Button3_Click
We'll figure it out.
Tom

[ This Message was edited by: TsTom on 2002-05-12 20:37 ]
Tom Schreiner is offline   Reply With Quote
Old May 13th, 2002, 02:08 AM   #6
chookers
 
Join Date: Mar 2002
Posts: 115
Default

Oh my Goodness, thank yo ufor giving me some hope, even though I still am not understanding where my problem is. Here's what I did to double check everything.

The Template is named SOSE.xlt
The Macro is named SOSECutPaste

I've gone into explorer to open the template and right clicked on the button. Here's what it says:

SOSE.xlt!SoseCutPaste -- Really good, right?

Next, Opened Excel>File>New>SOSE Template

Used the workbook, no worries, saved it to the desktop as TEST, and closed Excel.

Went back to Excel and File>New>SOSE template
Right clicked on the macro button (it's on a toolbar that opens and closes with the document - not on a form)and now it's assigned to

C:WindowsDesktopTEST.xls!SOSECutPaste

Same thing (obviously) if I go back to explorer and open the template. It's no longer SOSE.xlt!SOSECutPaste but as above.

Now I can deal with this here cuz I know what to do, but I know it isn't right. Now let's say I delete the TEST.xls document from the desktop and try to use my SOSE template with the macro -- forget it, it's looking for TEST to find the macro and I've deleted it, at far is it thinks, the macro is gone.

That the h*** is going on? What can I do to trouble shoot this? Do you have any idea where the problem may be?

Let me know if any ideas I can try. So far everything has failed. Thank you, Lauren
chookers is offline   Reply With Quote
Old May 13th, 2002, 02:13 AM   #7
Tom Schreiner
 
Join Date: Mar 2002
Posts: 6,680
Default

Someone here will figure this out.
If you wish, email the file and I will try to duplicate the problem on my sys.
Tom

Excel_Create@Earthlink.net
Tom Schreiner is offline   Reply With Quote
Old May 13th, 2002, 02:21 AM   #8
Tom Schreiner
 
Join Date: Mar 2002
Posts: 6,680
Default

I followed your steps to the letter...
Created template1.xlt and saved it in the templates folder...
Opened Excel, File, New, Template1
Saved as an Excel Workbook Test.xls to my desktop.
The macro followed the newly created workbook and when I reopened the template, the macro name was unaffected??
Eeeeeeeeeeeeek!
We'll figure it out!!!!
Tom
Tom Schreiner is offline   Reply With Quote
Old May 13th, 2002, 02:46 AM   #9
Tom Schreiner
 
Join Date: Mar 2002
Posts: 6,680
Default

I have your file and it is doing the same thing here as on your comp...
I'm beginning to waiver, but I'll say it again, We'll figure it out!
Tom
Tom Schreiner is offline   Reply With Quote
Old May 13th, 2002, 02:57 AM   #10
chookers
 
Join Date: Mar 2002
Posts: 115
Default

Ha! I knew I wasn't insane. Maybe what I will do is rewrite the code from scratch and see if that makes any difference. I have to leave work in about 1/2 hour so I may not have time before I go but I will try a test macro from scratch, a short easy one, and see if that works ok.

Thanks, Mr T!
chookers is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 12:34 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes