LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Office 2007 SaveAs Issue

My workbook starts out as a .xls workbook and I have code to check which
version of Excel is being used. If it's version 11 or less, it saves as a
..xls, if it's 12, it saves as a .xlsm. I've just stumbled across an issue
when I use the following code to save a workbook as an XLSM and it has named
ranges that are POP1, POP2, POP3, etc. This will ultimately affect several
hundred different individuals, so I don't want to make an interim solution to
have to change it in several months.

The code I'm using is:
filesavename = Application.GetSaveAsFilename( _
InitialFileName:=SuggName, _
fileFilter:="Excel Files (*.xlsm), *.xlsm")

If filesavename < "False" Then
ThisWorkbook.SaveAs filesavename
End If

I'm getting no errors regarding the POP1, POP2, POP3 names. Once the
workbook is closed, I can't open it back up again.

If I use the same workbook (freshly opened), turn off events and do a SAVEAS
to a .xlsm workbook, I get a message that reads

The Name, POP1, either conflicts with a valid range reference or is invalid
for Excel. The name has been replaced with _POP1.

I can subsequently reopen the second file, but can't reopen the first.

I've since fixed the name errors, but is there something I can do JUST IN
CASE I have name errors again so that it catches it. Otherwise, we end up
wtih unusable workbook.

Thanks,
Barb Reinhardt

 
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
Office 2007 Styles create issue with "Too many different cell form RyanAtWork Excel Discussion (Misc queries) 1 December 17th 09 03:48 AM
Office 2007 Compatibility Pack issue? bradmo Excel Worksheet Functions 1 February 25th 08 03:01 PM
Office 2007 Copy Paste Issue anshuman Excel Discussion (Misc queries) 5 August 18th 07 09:38 PM
Office 2007 Filter Copy Issue anshuman Excel Programming 0 August 18th 07 08:08 AM
SaveAs Issue - different approach PLPE[_15_] Excel Programming 1 July 8th 05 12:44 PM


All times are GMT +1. The time now is 02:49 AM.

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

About Us

"It's about Microsoft Excel"