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

[µo°Ý] ¬°¦ó¦Usheets ³QÁôÂäF

[µo°Ý] ¬°¦ó¦Usheets ³QÁôÂäF

½Ð±Ð¤j¤j:
        ±ß¾Ç¦³°ÝÃD¤T¡A·q½Ð½ç±Ð
¤@.VBA¦p¦ó¤U»Pªk¡A¨ÏA1.xls¤ºªº©Ò¦³sheetsÁôÂÃ
   ¥B¨ú®øÁôÂà »Ýpassword
¤G.©_©Ç   ­Ó¤H¾Ç²L   §ä¤£¥X­ì¦]
Application.Visible=False
FileName = ThisWorkbook.Path & "\¸ê®Æ®w\" & str1 & "¾Ç´Á¸ê®Æ.xls"
If fsobj.FileExists(FileName) Then
        With CreateObject(FileName)
            .Sheets(SHname).Cells.Copy wb.Sheets("Temp").Cells(1, 1)
            .Close True
        End With
End If
·í application.quit «á ¡AFileName¤§¦Usheets  ¨S¦³³QÁôÂÃ
¦ý
Application.Visible=False
FileName = ThisWorkbook.Path & "\¸ê®Æ®w\" & str1 & "¾Ç´Á¸ê®Æ.xls"
If fsobj.FileExists(FileName) Then
        With CreateObject(FileName)
           wb.Sheets("Temp").Cells.Copy  .Sheets(SHname).Cells(1, 1)
            .Close True
        End With
End If
·í application.quit «á ¡AFileName¤§¦Usheets  ³QÁôÂäF  
À³¦p¦ó¨Ï¥¦¤£ÁôÂà ¦A.Close True
¤T.¦p¦ó¨ÏA1.xls¥´¶}®É¤£Åã¥Ü¥\¯à¦C(*¤]´N¬O»¡¨Æ«e´N¤w¸g³]©w¦n)
     VBA¦p¦ó¦bB1.xls¨Æ«e¹ïA1.xls§@¨Æ«e³]©w

ÁÂÁÂ

¦^´_ 1# yangjie
  1. Option Explicit
  2. Sub Ex()
  3.     Dim FileName As String, E As Workbook
  4.     FileName = "D:\BOOK2.XLS"
  5.     With CreateObject(FileName)
  6.         '*** Åã¥Ü¬¡­¶Ã¯¬O³o¼Ë¶Ü? *****
  7.         .Windows(.Name).Visible = True
  8.         '.Sheets(SHname).Cells.Copy wb.Sheets("Temp").Cells(1, 1)
  9.         .Close True
  10.     End With
  11. End Sub
  12. Sub ¥\¯à¦C()
  13.     ¥\¯à¦C_Show True  'Åã¥Ü¥\¯à¦C
  14.     Stop
  15.     ¥\¯à¦C_Show False '¤£Åã¥Ü¥\¯à¦C
  16. End Sub
  17. Private Sub ¥\¯à¦C_Show(Msg As Boolean)
  18.     With Application
  19.         .DisplayFullScreen = Not Msg
  20.         .CommandBars.ActiveMenuBar.Enabled = Msg
  21.     End With
  22. End Sub
  23. Sub Sheets_ÁôÂÃ()
  24.     Dim i As Integer
  25.     With ActiveWorkbook
  26.         .Protect Password:="1234", Structure:=True, Windows:=True '«OÅ@¬¡­¶Ã¯ªº µ²ºc,µøµ¡
  27.         .Unprotect Password:="1234" '¬¡­¶Ã¯: ¸Ñ°£«OÅ@.
  28.         For i = 2 To .Sheets.Count  '¬¡­¶Ã¯¦Ü¤Ö­n¦³¤@±i¤u§@ªí¬O¥i¨£ªº
  29.             Sheet1.Visible = xlSheetVeryHidden  '­È= 2 :vba ªº¤u§@ªíÁôÂÃ,»Ý¥Îvba ¨ú®ø¤u§@ªíÁôÂÃ
  30.         Next
  31.         .Protect Password:="1234", Structure:=True, Windows:=True
  32.     End With
  33. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE
ÁÂÁª©¤j
Sheet1.Visible = xlSheetVeryHidden   »P
Sheet1.Visible = false      ¤@¼Ë¶Ü?
¤S
Sub Ex()
    Dim FileName As String, E As Workbook
    FileName = ThisWorkbook.Path & "\¸ê®Æ®w\" & "97¾Ç¦~¤W¾Ç´Á¸ê®Æ.xls"
    xlfilenam = Dir(FileName)
    Dim fsobj As Object
    Set fsobj = CreateObject("Scripting.FileSystemObject")
    If fsobj.FileExists(FileName) Then
        With CreateObject(FileName)
              .Windows(xlfilenam).Visible = False ---------¦¹¦æ¥i§_¥[±K
             .Close True
        End With
    End If

TOP

¦^´_ 2# GBKEE
¦A½Ð±ÐGBKEEª©¤j
³o¬O¦Û­qªí³æ  ¤w±K½X±±¨î¬yµ{
  Private Sub CommandButton1_Click()
    If Label1.Caption = "" Or Label1.Caption = "0" Then
        Unload Me
        Exit Sub
    End If
    If Label1.Caption = "510510" Then
        Sheets("­º­¶").Cells(5, 12) = Label1.Caption
        Unload Me
    Else
        TextBox1 = ""
        TextBox1.SetFocus
    End If

End Sub
Private Sub TextBox1_Change()
    If TextBox1 = "" Then
        Label1.Caption = TextBox1
        Exit Sub
    End If
    If Right(TextBox1, 1) <> "*" Then
        Label1.Caption = Label1.Caption & Right(TextBox1, 1)
    End If
    an = Len(TextBox1)
    TextBox1 = String(an, "*")
End Sub  
½Ð±Ðª©¤j:
§ÚªºCommandButton1.caption ¬O"½T©w"
·íTextBox1¿é¤J¤F±K½X¦n¤F    «ö  "½T©w"Áä §Y¥i
     ­Ó¤H·Q¤£²¾°Ê·Æ¹«  ª½±µ«ö  keyboard¤W"Enter"Áä  §Y¥iIJµo  CommandButton1_Click
     À³¦p¦ó¤U»yªk

TOP

¦^´_ 4# yangjie
---------¦¹¦æ¥i§_¥[±K ???
Sheet1.Visible = False ,  §A¥i¦b¤u§@ªí¤W¨ú®øÁôÂÃ
  1. '½Ð¸Ô¬ÝVBAªºKeyPress ¨Æ¥ó
  2. Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
  3.     If KeyAscii = 10 Then   '«ö¤U²Õ¦XÁä CTRL+Enter
  4.         CommandButton1.SetFocus
  5.         CommandButton1_Click
  6.     End If
  7. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 5# GBKEE
ÁÂÁÂGBKEE
½Ð±Ð
¨ú®ø ¦p ¥kÃ䪺ÁôÂà Sheet1.Visible = xlSheetVeryHidden   
¥Î Sheet1.Visible = True      ¥i¦³¨ä¥Lª¾¨ü­­?

TOP

¦^´_ 6# yangjie

¨ü­­·í¬O   
Sheet1.Visible = xlSheetVeryHidden  '­È= 2 :vba ªº¤u§@ªíÁôÂÃ,»Ý¥Îvba ¨ú®ø¤u§@ªíÁôÂÃ
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD