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

½Ð±Ð¤@­Ósheets³æ­Ó¥[±Kªº°ÝÃD, ·Ð½Ð¤j¤j½ç±Ð

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-12-23 18:30 ½s¿è

¦^´_ 10# joychiangg
¥[¤JThisWorkbook ªº¹w³]¨Æ¥ó
  1. Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
  2.     If Sh.Name <> "Sheet1" Then
  3.         Sh.Cells.Interior.ColorIndex = 2
  4.         Sh.Cells.Font.ColorIndex = 2
  5.     End If
  6. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-12-23 23:59 ½s¿è

¦^´_ 10# joychiangg
§R°£©Ò¦³¤u§@ªí¼Ò²Õ¤ºªºµ{§Ç
Thisworkbook¼Ò²Õ
  1. Private Sub Workbook_Open()
  2.     Sheets("sheet1").Select
  3. End Sub

  4. Private Sub Workbook_SheetActivate(ByVal Sh As Object)
  5. NoData Sh.Name
  6. End Sub
½Æ»s¥N½X
¤@¯ë¼Ò²Õ
  1. Sub NoData(sht As String)
  2. With Sheets(sht)
  3. If sht = "Sheet1" Then Exit Sub
  4.    .Cells.Font.ColorIndex = 2
  5.    .Cells.Interior.ColorIndex = 2
  6.    pwd = Application.InputBox("½Ð¿é¤J±K½X:")
  7.    Select Case sht
  8.    Case "¤¤¤s"
  9.    p = 40
  10.    Case "ªF¥x¥_"
  11.    p = 13
  12.    Case "«Ø¥_"
  13.    p = 48
  14.    End Select
  15. If pwd = CStr(p) Or pwd = 6309 Then
  16. Range("A1").Select
  17. Cells.Interior.ColorIndex = xlNone
  18. .Cells.Font.ColorIndex = xlColorIndexAutomatic
  19. Else
  20. MsgBox "¿é¤J¿ù»~¡A½Ð±q·s¿ï¾Ü!!"
  21. Sheets("sheet1").Select
  22. End If
  23. End With
  24. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD