ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Excell 2003 MsgBox²ö©ú©_§®ªº bug~~~

[µo°Ý] Excell 2003 MsgBox²ö©ú©_§®ªº bug~~~

Excell 2003 MsgBox²ö©ú©_§®ªº bug~~~

msgbox_bug.zip (14.25 KB)

­ì¥»ªºµ{¦¡«Ü¤j¤@­Ó¡A¶}±Ò®É«Ü¯Ó®É¶¡¡A©Ò¥H§Ú¥[¤@­Ó timer ¨ÓÅã¥Ü±Ò°Êªº®É¶¡¡A¥H§Q­×§ïµ{¦¡¡A

¦ý¬O¦³bug¡A§Ú¤@ª½´ú¸Õ¡B¤@ª½§R°£¡A§R¨ì³Ì«á³Ñ¤U³o¤T­Óµ{¦¡°Ï¶ô

¤½¦¡¤@¡B
¥Î¦b ³]©w®æ¦¡¤Æ±ø¥ó¡A¥D­n¥Øªº¬O¡AÀx¦s®æ C:L ³£¬O§Q¥Î¤½¦¡²£¥Íªº¡A

·íÀx¦s®æ¤º®e³Q­×§ï¦¨ª½±µ¼g¤J®É¡]¤]´N¬O¤½¦¡³Q§ï±¼¡^·|¥Î¬õ¦âÅã¥Ü¡A¤è«K¿ìµø

³o¼Ë¤~ª¾¹D³o®æªº¸ê®Æ¬O¼g¦ºªº¡A«D¤½¦¡²£¥Í

Option Explicit

'¦Û°Ê¤Æ®æ¦¡©úÅã¼Ð¥Ü
Function IsFormula(rng As Range) As Boolean
Dim cell As Range
    IsFormula = 1
    For Each cell In rng
        If cell.HasFormula = False Then
            IsFormula = 0
        End If
    Next
End Function

¦bÀɮ׶}±Ò®É¡A·|°õ¦æ¨â­Ó°Ê§@¡A

¤½¦¡¤G¡B
#1 ¤@­Ó¬O¿ï¾Ü a5³o¤@­ÓÀx¦s®æ¡]³o¬O¦]¬°¦sÀɮɡA¦ì¸mÀx¦s®æªº¦ì§}·|¦b¨ä¥¦¦a¤è¡A­n¤è«K¨C¦¸¶}±Òªº¾Þ§@¡A©Ò¥H³]©w¨ì a5

¤½¦¡¤T¡B
#2 ¬O ±N ´M§äªº¿ï¶µ¡A¤½¦¡§ï¦¨¤º®e¡C¹w³]¬O¤½¦¡¡A³o·|Åý´M§äÅܪº«Ü³Â·Ð¡]¤º®e³q³q¬O¤½¦¡²£¥Í¡^¡A

¨C¦¸³£­n¤â°Ê§ï¡A©Ò¥H¥[¤F³o¤@¬q¡AÅý´M§äªº¿ï¶µ¡AÅܦ¨¤º®e¡C


Dim Time0

Private Sub Workbook_Open()

Time0 = Timer



'--#1-----------------------------------------------------------


        Sheets("Sheet1").Activate
        Sheets("Sheet1").Range("A5").Select


'--#2-----------------------------------------------------------
'Configure Excel to look by default in Formulas, Values and Comments
'http://superuser.com/questions/114831/configure-excel-to-look-by-default-in-formulas-values-and-comments
        '­×¥¿´M§ä³]©w¬°¤º®e¦Ó«D¤½¦¡
        'Application.ScreenUpdating = False
                Worksheets(1).Cells.Find _
                What:="", _
                After:=ActiveCell, _
                LookIn:=xlValues, _
                LookAt:=xlPart, _
                SearchOrder:=xlByRows, _
                SearchDirection:=xlNext, _
                MatchCase:=False, _
                MatchByte:=False, _
                SearchFormat:=False
        'Application.ScreenUpdating = True

'-------------------------------------------------------------
'Dim Time0
'Time0 = Timer
MsgBox "°õ¦æ®É¶¡#2 " & Timer - Time0 & " ¬í", vbOKOnly

'-------------------------------------------------------------

End Sub



°ÝÃDÂI¦b©ó¡A³Ì«á¤@¦æªº MsgBox "°õ¦æ®É¶¡#2 " & Timer - Time0 & " ¬í", vbOKOnly  ¤£·|°õ¦æ

¦]¬°¦Û°Ê¤Æ®æ¦¡ ¡B ´M§ä ¡B ÂI¿ï a5  ³o¤T­Ó°Ê§@¡Aµ²ªG¾É­P MsgBox ¤£·|Åã¥Ü¡C

±N MsgBox ²¾¨ì #2¤§¤W¡A´N·|Åã¥Ü¡A¦b#2¤§«á´N¤£·|Åã¥Ü¡A±N #1 §ï ¦¨¨S¦³¦Û°Ê§@®æ¦¡ªº Äæ ex: n1 ´N·|Åã¥Ü

±Na5 ªº¤½¦¡§R°£¤]·|Åã¥Ü¡A±N ¦Û°Ê¤Æ®æ¦¡²¾°£¡A¤]·|Åã¥Ü

¤Ï¥¿´N¬O³o¤T­Ó­è¦n²Õ¦X¦b¤@°_¡AMsgBox ´N¤£·|Åã¥Ü

·dªº§Ú¦n·Ð§r~~

½Ð°Ý°ÝÃD·½ÀY¬O¤°»ò¡H
¤½¶}¸gÅç¡A³Ð³y´¼¼z¡]§Ú¤S¤£¾a³o¹L¬¡¡^

        ÀR«ä¦Û¦b : ¤@­Ó¤H¤£©È¿ù¡A´N©È¤£§ï¹L¡A§ï¹L¨Ã¤£Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD