Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Excel 2007 erases VBA code from Excel 2003

Hello,
For the past two years, I've been using a purchase order generator
which I made in Excel VBA. The main file is a template with two
sheets. Sheet 1 is the purchase order, and sheet 2 is a list of all
my contacts. Sheet 1 has two buttons, one to update my contact list
and one to create a PO and save it to a specified folder... So, when I
hit the button to update the contacts, I get a dialog box which asks
for name, address, etc. On that dialog box there is another button
which is supposed to update the contact list and then save the entire
file as the new template. So, of course the new template will have
all of the VBA code. This system worked well for 2 years is Excel
2003. Last week I updated to Excel 2007 and when I updated my contact
page, the resulting template was saved but all of the VBA code was
gone. So, essentially the template is destroyed. I tried this again
with another copy of the file and the same thing happened.

Can someone explain to me why Excel 2007 is erasing my VBA code? And
what can I do to prevent this?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 896
Default Excel 2007 erases VBA code from Excel 2003

Excel 2007 uses 2 file formats
..xlsx (no macros/code)
..xlsm (containing macros/code)

seems like you are saving yr template in .xlsx format
which should be saved in .xlsm



On 15 Kwi, 15:16, Andrew wrote:
Hello,
For the past two years, I've been using a purchase order generator
which I made in Excel VBA. *The main file is a template with two
sheets. *Sheet 1 is the purchase order, and sheet 2 is a list of all
my contacts. *Sheet 1 has two buttons, one to update my contact list
and one to create a PO and save it to a specified folder... So, when I
hit the button to update the contacts, I get a dialog box which asks
for name, address, etc. *On that dialog box there is another button
which is supposed to update the contact list and then save the entire
file as the new template. *So, of course the new template will have
all of the VBA code. *This system worked well for 2 years is Excel
2003. *Last week I updated to Excel 2007 and when I updated my contact
page, the resulting template was saved but all of the VBA code was
gone. So, essentially the template is destroyed. *I tried this again
with another copy of the file and the same thing happened.

Can someone explain to me why Excel 2007 is erasing my VBA code? *And
what can I do to prevent this?

thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel 2007 erases VBA code from Excel 2003

On Apr 15, 7:35 am, Jarek Kujawa wrote:
Excel 2007 uses 2 file formats
.xlsx (no macros/code)
.xlsm (containing macros/code)

seems like you are saving yr template in .xlsx format
which should be saved in .xlsm

On 15 Kwi, 15:16, Andrew wrote:

Hello,
For the past two years, I've been using a purchase order generator
which I made in Excel VBA. The main file is a template with two
sheets. Sheet 1 is the purchase order, and sheet 2 is a list of all
my contacts. Sheet 1 has two buttons, one to update my contact list
and one to create a PO and save it to a specified folder... So, when I
hit the button to update the contacts, I get a dialog box which asks
for name, address, etc. On that dialog box there is another button
which is supposed to update the contact list and then save the entire
file as the new template. So, of course the new template will have
all of the VBA code. This system worked well for 2 years is Excel
2003. Last week I updated to Excel 2007 and when I updated my contact
page, the resulting template was saved but all of the VBA code was
gone. So, essentially the template is destroyed. I tried this again
with another copy of the file and the same thing happened.


Can someone explain to me why Excel 2007 is erasing my VBA code? And
what can I do to prevent this?


thanks


Actually, I have set the default to save as *.xls. But I'm not sure
that this applies to saving templates. I'm certain that my code used
to save as *.xlt. Where would I find these settings in Excel 2007?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 896
Default Excel 2007 erases VBA code from Excel 2003

I might have been missing sth.
but there should be an .xltm format in yr SaveAs window (Save as type)
sorry, am using a Polish version of Excel 2007
or the solution is totally different


On 15 Kwi, 18:36, Andy wrote:
On Apr 15, 7:35 am, Jarek Kujawa wrote:





Excel 2007 uses 2 file formats
.xlsx (no macros/code)
.xlsm (containing macros/code)


seems like you are saving yr template in .xlsx format
which should be saved in .xlsm


On 15 Kwi, 15:16, Andrew wrote:


Hello,
For the past two years, I've been using a purchase order generator
which I made in Excel VBA. *The main file is a template with two
sheets. *Sheet 1 is the purchase order, and sheet 2 is a list of all
my contacts. *Sheet 1 has two buttons, one to update my contact list
and one to create a PO and save it to a specified folder... So, when I
hit the button to update the contacts, I get a dialog box which asks
for name, address, etc. *On that dialog box there is another button
which is supposed to update the contact list and then save the entire
file as the new template. *So, of course the new template will have
all of the VBA code. *This system worked well for 2 years is Excel
2003. *Last week I updated to Excel 2007 and when I updated my contact
page, the resulting template was saved but all of the VBA code was
gone. So, essentially the template is destroyed. *I tried this again
with another copy of the file and the same thing happened.


Can someone explain to me why Excel 2007 is erasing my VBA code? *And
what can I do to prevent this?


thanks


Actually, I have set the default to save as *.xls. *But I'm not sure
that this applies to saving templates. *I'm certain that my code used
to save as *.xlt. *Where would I find these settings in Excel 2007?- Ukryj cytowany tekst -

- Pokaż cytowany tekst -


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Excel 2007 erases VBA code from Excel 2003

On Apr 15, 9:16*am, Andrew wrote:
Hello,
For the past two years, I've been using a purchase order generator
which I made in Excel VBA. *The main file is a template with two
sheets. *Sheet 1 is the purchase order, and sheet 2 is a list of all
my contacts. *Sheet 1 has two buttons, one to update my contact list
and one to create a PO and save it to a specified folder... So, when I
hit the button to update the contacts, I get a dialog box which asks
for name, address, etc. *On that dialog box there is another button
which is supposed to update the contact list and then save the entire
file as the new template. *So, of course the new template will have
all of the VBA code. *This system worked well for 2 years is Excel
2003. *Last week I updated to Excel 2007 and when I updated my contact
page, the resulting template was saved but all of the VBA code was
gone. So, essentially the template is destroyed. *I tried this again
with another copy of the file and the same thing happened.

Can someone explain to me why Excel 2007 is erasing my VBA code? *And
what can I do to prevent this?

thanks


You can try saving it as an Excel Macro Enabled Template - .XLMT.
You should also check the settings under Excel Options Save - this
should be set at .XLSX.
We had the same problems changing over - basically you can loose the
VBA code when it saves from 2007 back to 2003 versions of excel
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Should this code work in Excel 2007 as it does in 2003? Tim Miller Excel Programming 1 February 13th 09 09:52 PM
Automation C++ code works for Excel 2003, not for Excel 2007 jayo Excel Programming 0 August 6th 08 06:51 PM
Excel 2007 ActiveChart formatting erases graph Mbballfan Excel Programming 0 July 31st 08 10:03 PM
Help Excel 2003 code failing in 2007 Bob C Excel Programming 12 July 25th 08 03:27 PM
Excel erases the "To:" field when emailing Mike M. Excel Discussion (Misc queries) 2 September 26th 05 01:24 PM


All times are GMT +1. The time now is 10:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"