Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/include.php on line 73

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/include.php on line 157

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/include.php on line 235

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /kunden/188616_52080/maninweb/business/include.php:73) in /kunden/188616_52080/maninweb/business/include.php on line 34

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /kunden/188616_52080/maninweb/business/include.php:73) in /kunden/188616_52080/maninweb/business/include.php on line 34

Deprecated: Function set_magic_quotes_runtime() is deprecated in /kunden/188616_52080/maninweb/business/include.php on line 62

Deprecated: Function eregi_replace() is deprecated in /kunden/188616_52080/maninweb/business/include.php on line 247

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 184

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 196

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 208

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 221

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 234

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 246

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 258

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 270

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 282

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 294

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.global.inc.php on line 316

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.moduleloader.inc.php on line 69

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.moduleloader.inc.php on line 129

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 311

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 530

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Strict Standards: Declaration of CGExtensions::GetHelp() should be compatible with CMSModule::GetHelp($lang = 'en_US') in /kunden/188616_52080/maninweb/business/modules/CGExtensions/CGExtensions.module.php on line 45

Strict Standards: Declaration of CGExtensions::GetAdminDescription() should be compatible with CMSModule::GetAdminDescription($lang = 'en_US') in /kunden/188616_52080/maninweb/business/modules/CGExtensions/CGExtensions.module.php on line 45

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Strict Standards: Declaration of Comments::GetAdminDescription() should be compatible with CMSModule::GetAdminDescription($lang = 'en_US') in /kunden/188616_52080/maninweb/business/modules/Comments/Comments.module.php on line 256

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Strict Standards: Declaration of MovedPages::GetHelp() should be compatible with CMSModule::GetHelp($lang = 'en_US') in /kunden/188616_52080/maninweb/business/modules/MovedPages/MovedPages.module.php on line 416

Strict Standards: Declaration of MovedPages::GetAdminDescription() should be compatible with CMSModule::GetAdminDescription($lang = 'en_US') in /kunden/188616_52080/maninweb/business/modules/MovedPages/MovedPages.module.php on line 416

Strict Standards: Declaration of News::GetAdminDescription() should be compatible with CMSModule::GetAdminDescription($lang = 'en_US') in /kunden/188616_52080/maninweb/business/modules/News/News.module.php on line 740

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Strict Standards: Declaration of Search::GetAdminDescription() should be compatible with CMSModule::GetAdminDescription($lang = 'en_US') in /kunden/188616_52080/maninweb/business/modules/Search/Search.module.php on line 268

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Strict Standards: Non-static method PageInfoOperations::LoadPageInfoByContentAlias() should not be called statically in /kunden/188616_52080/maninweb/business/index.php on line 237

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.contentoperations.inc.php on line 73

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.contentoperations.inc.php on line 559

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/Tree/Tree.php on line 288

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/Tree/Tree.php on line 299

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/Tree/Tree.php on line 315

Deprecated: Function split() is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.contentoperations.inc.php on line 917

Strict Standards: Non-static method Events::SendEvent() should not be called statically in /kunden/188616_52080/maninweb/business/index.php on line 360

Strict Standards: Non-static method Events::ListEventHandlers() should not be called statically in /kunden/188616_52080/maninweb/business/lib/classes/class.events.inc.php on line 104

Warning: Cannot modify header information - headers already sent by (output started at /kunden/188616_52080/maninweb/business/include.php:73) in /kunden/188616_52080/maninweb/business/index.php on line 362
Maninweb.de - Professional Excel Solutions
Deprecated: Function ereg_replace() is deprecated in /kunden/188616_52080/maninweb/business/plugins/function.stylesheet.php on line 104
Sitemap  · Français  · English  · Deutsch
Home » Blog » Article

Deprecated: Function ereg_replace() is deprecated in /kunden/188616_52080/maninweb/business/plugins/function.title.php on line 35
Article

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.useroperations.inc.php on line 51

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.useroperations.inc.php on line 84

Deprecated: Assigning the return value of new by reference is deprecated in /kunden/188616_52080/maninweb/business/lib/classes/class.useroperations.inc.php on line 182

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154


Strict Standards: Non-static method Events::SendEvent() should not be called statically in /kunden/188616_52080/maninweb/business/plugins/prefilter.precompilefunc.php on line 84

Strict Standards: Non-static method Events::ListEventHandlers() should not be called statically in /kunden/188616_52080/maninweb/business/lib/classes/class.events.inc.php on line 104

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /kunden/188616_52080/maninweb/business/lib/smarty/Smarty_Compiler.class.php on line 270

Strict Standards: Non-static method Events::SendEvent() should not be called statically in /kunden/188616_52080/maninweb/business/plugins/postfilter.postcompilefunc.php on line 84

Strict Standards: Non-static method Events::ListEventHandlers() should not be called statically in /kunden/188616_52080/maninweb/business/lib/classes/class.events.inc.php on line 104
Positioning of controls using VBA, Bug in Excel 2010?

08.07.2010

When testing an own developped VBA application in Excel 2010, I noticed a curiosity, which I personally would classify as a bug in Excel 2010.

My application is using some form controls, especially checkboxes which are hidden or unhidden per code. And the cells containing the controls are also hidden or unhidden per code. The error in Excel 2010 appears when following steps are done:

This problem does not appear in Excel 2007. Now, for getting sure that this is actually a problem of Excel 2010, I wrote a small sample application, which positioned 9 checkboxes as shown in the screenshots below. Please note, that I haved used the german version of Excel for the screenshots as the english version of Excel 2010 is not available yet for me. The properties for each control are set to "Move but don't size with cells" (in German "Nur von Zellposition abhängig"). The two screenshots below show the worksheet in Excel 2007 and Excel 2010 in the initial state without any influence from VBA code.

Excel Controls Bug


Strict Standards: Non-static method Events::SendEvent() should not be called statically in /kunden/188616_52080/maninweb/business/plugins/prefilter.precompilefunc.php on line 84

Strict Standards: Non-static method Events::ListEventHandlers() should not be called statically in /kunden/188616_52080/maninweb/business/lib/classes/class.events.inc.php on line 104

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /kunden/188616_52080/maninweb/business/lib/smarty/Smarty_Compiler.class.php on line 270

Strict Standards: Non-static method Events::SendEvent() should not be called statically in /kunden/188616_52080/maninweb/business/plugins/postfilter.postcompilefunc.php on line 84

Strict Standards: Non-static method Events::ListEventHandlers() should not be called statically in /kunden/188616_52080/maninweb/business/lib/classes/class.events.inc.php on line 104

Excel Controls Bug

Then I created the two procedures „HideCheckboxes()“ and „ShowCheckboxes()“ in a module and linked them to the two buttons. The relative simple code just hides or unhides the controls and the rows.

Public Sub HideCheckboxes()
  
  Dim n As Long
  
' With...
  
  With ThisWorkbook.ActiveSheet
  
'   Loop...
    
    For n = 1 To .Shapes.Count
      
      If Not .Shapes(n).FormControlType <> 1 Then
        
       .Shapes(n).Visible = False
        
      End If
      
    Next n
    
'   Hide...
    
   .Range("$2:$12").EntireRow.Hidden = True
  
  End With
  
' Save...
  
  ThisWorkbook.Save
  
End Sub

Public Sub ShowCheckboxes()

  Dim n As Long
  
' With...
  
  With ThisWorkbook.ActiveSheet
    
'   Loop...
    
    For n = 1 To .Shapes.Count
      
      If Not .Shapes(n).FormControlType <> 1 Then
        
       .Shapes(n).Visible = True
        
      End If
      
    Next n
  
'   Hide...
      
   .Range("$2:$12").EntireRow.Hidden = False
  
  End With
  
' Save...

  ThisWorkbook.Save
  
End Sub

If the procedure linked to the button „Hide“ is called and the workbook saved, closed and reopened, the you can see the results as shown in the following screenshots for Excel 2007 and Excel 2010.

Excel Controls Bug

Excel Controls Bug

As you can see, all controls are stacked in Excel 2010. If you display the property „TopLeftCell“ for each control in a MsgBox, you will notice that in Excel 2007 all values ($C$3, $C$4, $C$5, ...) are correct. Excel 2010 overwrites this property to $C$2 directly after hiding the controls and if you save and close the workbook, the value $C$2 is saved and all previous values are lost. This logically leads to an incorrect positioning of the controls when openening the file again.

Excel Controls Bug

An interesting behavious is that „TopLeftCell“ can be restored unless the workbook is not saved and closed.

The file is stored in the Open XML Format, therefore we can rename the file to *.zip and decompress the file with an unzip application. Depending on whether the file was created with Excel 2007 or Excel 2010, the archive contains different files a folder called „drawings“. The next screenshot shows an excerpt of the content of the two files „drawing1.xml“ and „vmlDrawing1.vml“ for the Excel 2010.

Excel Controls Bug

Let have look to the „vmlDrawing1.vml“ file, if you open the file with an text editor you can easily find the sections for the checkboxes.

Excel Controls Bug

The word „Anchor“ suggests the cell that is used for positioning the checkbox. And if we compare the values for „Anchor“ from the file for Excel 2007 with the values from the file for Excel 2010, we can notice that after hiding the controls in Excel 2010, all values have been set to „2, 0, 1, 0, 4, 0, 13, 0“. In the file for Excel 2007, these values are „2, 0, 2, 0, 4, 0, 13, 0“ for the first checkbox, „2, 0, 3, 0, 4, 0, 13, 0“ for the second checkbox and so on.

If you manually restore these values in the file „vmlDrawing1.vml“ for Excel 2010, then rebuild a zip file, rename it to a XLSX file and open the file in Excel 2007, you will notice that all the positions of the form controls are restaured. However, if you open the file in Excel 2010, nothing is restaured. I think, the „vmlDrawing1.vml“ file remained for compatibilty reasons in Excel 2010.

The file „drawing1.xml“ also contains some values for the checkboxes, but also the file „sheet1.xml“ for the first sheet in the „worksheets“. The values differs from the values for unhidden controls. I had experimented a little by changing some values to the values for unhidden controls. Unfortunately it was not possible for me to restore the original positions for the controls.

Finally I tested some other form controls. Excel 2010 has the same behaviour if you use comboboxes, radiobuttons or buttons. If you use buttons, it may happen that the buttons are reduced to a line, so someone may think they were removed.

If this behavious was not intentionally developped by the Office 2010 developers, then it's a bug. Especially since this behavior has from my point of view no significant advantages.

You can avoid this problem by storing the position of the controls an a data sheet, for example, and, when unhidung the controls, set their original positions per code.

This article has also been published in on my other blog Excel-Ticker.






Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154

Warning: Parameter 1 to cms_module_Lang() expected to be a reference, value given in /kunden/188616_52080/maninweb/business/lib/classes/class.module.inc.php on line 2154