Showing posts with label excel. Show all posts
Showing posts with label excel. Show all posts

November 06, 2010

more on vba problems in excel for mac 2011

there are problems related to vba being found after i installed excel for mac 2011 on my machine. not 100% excel coded in excel for windows 2007/2010 with common features (i.e. not include active-x or ribbon change) is accepted in excel for mac.

there’s a bug in instr function which makes excel for mac out of memory. when you use an if function & one of its criteria is based on result of instr function, it fails. the code is like below:

if instr(1, cells(x,y), zzzz, 1) = 0 and cells(a,b) = “ccc” 
  …

end if

another scene is if the cells are filled with date, the date format is affected & overridden by mac os x language setting. vba cannot detect those fields either or make excel out of memory.

and when you make changes in excel for mac, digital cert included in the spreadsheet is lost & you need to mount it back in windows version again before you can make the code live again.

July 24, 2007

so damned clever excel 2007

finally finds out why my vba is ok in excel 2003 but not in 2007. when a field format is set already, and you use vba to set the same format again, excel terminates. but this does not happen in 2003. cool? thx microsoft.

April 29, 2007

bug on excel 2007 macro?

below codes (simplified a bit) are ok run in excel 2003 but not in 2007, why?

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Cells(Target.Row, 7) = Cells(Target.Row, 2) * Cells(Target.Row, 4)
End Sub


run-time error -2147417848(80010108) is prompted (Method '_Default' of object '_Range' failed) and closed.