Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default compatibility mode checking Excel & VB

How do I stop excel displaying a prompt to check for compatibility every time
I save a file in 97/2003 format from VB code?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default compatibility mode checking Excel & VB

answer found in Excel Programming user group:

Try Application.DisplayAlerts = False
see:
http://www.microsoft.com/office/comm...s/settings.xml
Thanks

"thelemeuk" wrote:

How do I stop excel displaying a prompt to check for compatibility every time
I save a file in 97/2003 format from VB code?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default compatibility mode checking Excel & VB

I've found that this doesn't work if any changes at all have been made to
the newly created workbook prior to saving. The Compatibility Checker is not
affected by Display Alerts. You need to set an Excel 2007 property called
CheckCompatibility to False, which only affects the display of the annoying
dialog if no changes have yet been made to the workbook.

''In the main procedu

Set wbExport = Workbooks.Add(xlWBATWorksheet)

If Val(Application.Version) < 12 Then
iFileFormat = xlWorkbookNormal
Else
iFileFormat = FormatxlExcel8
End If

If Val(Application.Version) = 12 Then
CheckCompat wbExport, False
End If

wbExport.SaveAs sFullName, ThisWorkbook.FileFormat

''Place this in a separate module, so it won't raise a compile error if
Excel 2003 or earlier is running:

Sub CheckCompat(wb As Workbook, bCheckCompat As Boolean)
wb.CheckCompatibility = bCheckCompat
End Sub


- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______



"thelemeuk" wrote in message
...
answer found in Excel Programming user group:

Try Application.DisplayAlerts = False
see:
http://www.microsoft.com/office/comm...s/settings.xml
Thanks

"thelemeuk" wrote:

How do I stop excel displaying a prompt to check for compatibility every
time
I save a file in 97/2003 format from VB code?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default compatibility mode checking Excel & VB

Thanks Jon - the workbook/module containing the suggested code now runs OK
but as you say, the saved files still have the compatibility check when
opened and resaved.

"Jon Peltier" wrote:

I've found that this doesn't work if any changes at all have been made to
the newly created workbook prior to saving. The Compatibility Checker is not
affected by Display Alerts. You need to set an Excel 2007 property called
CheckCompatibility to False, which only affects the display of the annoying
dialog if no changes have yet been made to the workbook.

''In the main procedu

Set wbExport = Workbooks.Add(xlWBATWorksheet)

If Val(Application.Version) < 12 Then
iFileFormat = xlWorkbookNormal
Else
iFileFormat = FormatxlExcel8
End If

If Val(Application.Version) = 12 Then
CheckCompat wbExport, False
End If

wbExport.SaveAs sFullName, ThisWorkbook.FileFormat

''Place this in a separate module, so it won't raise a compile error if
Excel 2003 or earlier is running:

Sub CheckCompat(wb As Workbook, bCheckCompat As Boolean)
wb.CheckCompatibility = bCheckCompat
End Sub


- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______



"thelemeuk" wrote in message
...
answer found in Excel Programming user group:

Try Application.DisplayAlerts = False
see:
http://www.microsoft.com/office/comm...s/settings.xml
Thanks

"thelemeuk" wrote:

How do I stop excel displaying a prompt to check for compatibility every
time
I save a file in 97/2003 format from VB code?




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default compatibility mode checking Excel & VB

Once the file is saved the first time, the CheckCompatibility setting works
anytime.

- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______


"thelemeuk" wrote in message
...
Thanks Jon - the workbook/module containing the suggested code now runs OK
but as you say, the saved files still have the compatibility check when
opened and resaved.

"Jon Peltier" wrote:

I've found that this doesn't work if any changes at all have been made to
the newly created workbook prior to saving. The Compatibility Checker is
not
affected by Display Alerts. You need to set an Excel 2007 property called
CheckCompatibility to False, which only affects the display of the
annoying
dialog if no changes have yet been made to the workbook.

''In the main procedu

Set wbExport = Workbooks.Add(xlWBATWorksheet)

If Val(Application.Version) < 12 Then
iFileFormat = xlWorkbookNormal
Else
iFileFormat = FormatxlExcel8
End If

If Val(Application.Version) = 12 Then
CheckCompat wbExport, False
End If

wbExport.SaveAs sFullName, ThisWorkbook.FileFormat

''Place this in a separate module, so it won't raise a compile error if
Excel 2003 or earlier is running:

Sub CheckCompat(wb As Workbook, bCheckCompat As Boolean)
wb.CheckCompatibility = bCheckCompat
End Sub


- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______



"thelemeuk" wrote in message
...
answer found in Excel Programming user group:

Try Application.DisplayAlerts = False
see:
http://www.microsoft.com/office/comm...s/settings.xml
Thanks

"thelemeuk" wrote:

How do I stop excel displaying a prompt to check for compatibility
every
time
I save a file in 97/2003 format from VB code?








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default compatibility mode checking Excel & VB

Hi Jon,

I created two new modules, but I'm still getting the compile error. Is
there a better way to shut the check off?

Thanks!
Marie


"Jon Peltier" wrote:

I've found that this doesn't work if any changes at all have been made to
the newly created workbook prior to saving. The Compatibility Checker is not
affected by Display Alerts. You need to set an Excel 2007 property called
CheckCompatibility to False, which only affects the display of the annoying
dialog if no changes have yet been made to the workbook.

''In the main procedu

Set wbExport = Workbooks.Add(xlWBATWorksheet)

If Val(Application.Version) < 12 Then
iFileFormat = xlWorkbookNormal
Else
iFileFormat = FormatxlExcel8
End If

If Val(Application.Version) = 12 Then
CheckCompat wbExport, False
End If

wbExport.SaveAs sFullName, ThisWorkbook.FileFormat

''Place this in a separate module, so it won't raise a compile error if
Excel 2003 or earlier is running:

Sub CheckCompat(wb As Workbook, bCheckCompat As Boolean)
wb.CheckCompatibility = bCheckCompat
End Sub


- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______



"thelemeuk" wrote in message
...
answer found in Excel Programming user group:

Try Application.DisplayAlerts = False
see:
http://www.microsoft.com/office/comm...s/settings.xml
Thanks

"thelemeuk" wrote:

How do I stop excel displaying a prompt to check for compatibility every
time
I save a file in 97/2003 format from VB code?




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
How can I turn off compatibility mode in Excel 2007? HaJiggity Excel Discussion (Misc queries) 14 April 30th 23 11:41 AM
Excel 2007 Compatibility Mode Not Responding Tim Malle Excel Discussion (Misc queries) 0 February 19th 09 11:52 PM
EXCEL 2007 COMPATIBILITY MODE ISSUE Gemi Setting up and Configuration of Excel 1 September 29th 08 03:01 AM
Compatibility Mode to Excel 2007 Jennifer Excel Worksheet Functions 4 September 16th 08 05:49 PM
EXCEL 2007 OPENING IN COMPATIBILITY MODE FARAZ QURESHI Excel Discussion (Misc queries) 1 May 5th 08 12:23 PM


All times are GMT +1. The time now is 12:07 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"