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

(·PÁ¤j¤j­Ì¨ó§U§¹¦¨)¦p¦ó±Æ°£~·íµ{¦¡«Ø¥ß©ó~¶}±Ò®É¼g¤J~¨C¦¸Ãö³¬³£·|°Ý¬O§_­nÀx¦s

(·PÁ¤j¤j­Ì¨ó§U§¹¦¨)¦p¦ó±Æ°£~·íµ{¦¡«Ø¥ß©ó~¶}±Ò®É¼g¤J~¨C¦¸Ãö³¬³£·|°Ý¬O§_­nÀx¦s

¥»©«³Ì«á¥Ñ av8d ©ó 2012-6-29 16:17 ½s¿è

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    For Each Sh In Sheets
    If Sh.Name <> "Index" Then Sh.Visible = False
End Sub

Private Sub Workbook_Open()
    Sheets("Index").Select
    For i = 1 To 4
        ActiveSheet.OLEObjects("CommandButton" & i).Visible = False
    Next
   
    ActiveSheet.OLEObjects("Textbox1").Activate
End Sub

·íµ{¦¡«Ø¥ß©ó~¶}±Ò®É¼g¤J~¨C¦¸Ãö³¬³£·|°Ý¬O§_­nÀx¦s~¬O§_¥i¥HÅý¥L¦Û°Ê§PÂ_~©Î¬O¨ä¥L¤èªk?

  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2.     Dim result
  3.     If ThisWorkbook.Saved = False Then
  4.         result = MsgBox("""" & ThisWorkbook.Name & """ ¦¹Àɮפw³Q­×§ï,¬O§_­nÀx¦s?", vbYesNoCancel)
  5.     End If
  6.     If result = vbYes Then
  7.         For Each Sh In Sheets
  8.             If Sh.Name <> "Index" Then Sh.Visible = False
  9.         Next
  10.         ThisWorkbook.Save
  11.         Exit Sub
  12.     ElseIf result = vbNo Then
  13.         ThisWorkbook.Saved = True
  14.     ElseIf result = vbCancel Then
  15.         Cancel = True
  16.         Exit Sub
  17.     End If   
  18. End Sub
  19. WORKBOOK_OPEN«á ªºª¬ºA³]¦¨¤wÀx¦s
  20. Private Sub Workbook_Open()
  21.     Sheets("Index").Select
  22.     For i = 1 To 4
  23.         ActiveSheet.OLEObjects("CommandButton" & i).Visible = False
  24.     Next
  25.    
  26.     ActiveSheet.OLEObjects("Textbox1").Activate
  27.    thisworkbook.saved=true
  28. End Sub
½Æ»s¥N½X
Ãö®É¦Û°Ê¦s
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2.     For Each Sh In Sheets
  3.     If Sh.Name <> "Index" Then Sh.Visible = False
  4.    thisworkbook.save
  5. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¨ä¹ê·|¸ß°Ý§A­n¤£­nÀx¦s~ ³o¬O¦³»Ý­nªº~

¦³¨Ç®É­Ô¦b­×§ï¤F¬Y¨Ç¸ê®Æ®É~ ¦³¥i¯à§ï¿ù~
­Y¬O¤£excel¸ß°Ýªº¸Ü~ ¦³¥i¯à·|¾É­P¾ã­Ó¸ê®ÆµLªk³Q±Ï¦^¨Ó~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ¥@¤W¦³¨â¥ó¨Æ¤£¯àµ¥¡G¤@¡B§µ¶¶ ¤G¡B¦æµ½¡C
ªð¦^¦Cªí ¤W¤@¥DÃD