Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2014, 08:47 AM
billy8b8 billy8b8 is offline Can't save userform macro from 2003 to 2010 Windows 7 64bit Can't save userform macro from 2003 to 2010 Office 2013
Novice
Can't save userform macro from 2003 to 2010
 
Join Date: Jul 2014
Posts: 20
billy8b8 is on a distinguished road
Default Can't save userform macro from 2003 to 2010


In a previous post, I learned why the macro to open a userform was not visible in the project explorer (the macro created the form on the fly).

Using the organizer, I moved the macro to a new template, but the form doesn’t open when I open a new document based on the template. I have also tried saving the old template as a 2010 template, and it still doesn’t open the form.

Something must be missing to make the macro work in the new template, but I don’t know enough about VBA to figure out what it is. As I said before, the macro is visible in the code window but doesn’t appear in the project explorer.

Thanks for your help.
Reply With Quote
  #2  
Old 07-26-2014, 07:58 PM
macropod's Avatar
macropod macropod is offline Can't save userform macro from 2003 to 2010 Windows 7 32bit Can't save userform macro from 2003 to 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,341
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your old macro was in a code module named AutoNew. To export the sub and maintain its functionality, you probably needed to export the whole AutoNew module, then re-import the module into the new template - or you could simply open the template and use SaveAs to save it in the .dotm format. Unless you do either of those things, you'll need to rename the macro from 'Main' to 'AutoNew' or, if you've added it to the template's 'ThisDocument' module, 'Document_New'
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
userform



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't save userform macro from 2003 to 2010 Macro to save as pdf with ability to choose save as folder rvessio Word VBA 4 07-25-2016 12:37 PM
Can't save userform macro from 2003 to 2010 Outlook 2010 Macro Save as MSG, Choose Destination, set default filename rslck Outlook 1 06-19-2014 10:16 AM
VBA code to update record in Access 2003 using Userform in Excel primmer3001 Excel Programming 0 08-29-2011 04:25 PM
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM
[Word 2003] Macro's and a UserForm xanuex Word VBA 0 10-19-2009 05:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft