回復 2#GBKEE
謝謝版大
Sheet1.Visible = xlSheetVeryHidden 與
Sheet1.Visible = false 一樣嗎?
又
Sub Ex()
Dim FileName As String, E As Workbook
FileName = ThisWorkbook.Path & "\資料庫\" & "97學年上學期資料.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 ---------此行可否加密
.Close True
End With
End If作者: yangjie 時間: 2014-6-14 00:21
回復 2#GBKEE
再請教GBKEE版大
這是自訂表單 已密碼控制流程
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
請教版大:
我的CommandButton1.caption 是"確定"
當TextBox1輸入了密碼好了 按 "確定"鍵 即可
個人想不移動滑鼠 直接按 keyboard上"Enter"鍵 即可觸發 CommandButton1_Click
應如何下語法作者: GBKEE 時間: 2014-6-14 06:00