- ©«¤l
- 2839
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2895
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2025-2-15
|
¦^´_ 4# 317
n´XÓµ{§Ç:
¼Ò²Õ°Ï:
Public PrntChk%
Sub Macro1()
PrntChk = 1 '¦C¦L±±¨î½X
UserForm1.Show
End Sub
¬¡¶Ã¯/µ{§Ç°Ï:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "¤u§@ªí1" Then
If PrntChk <> 1 Then Cancel = True
End If
End Sub
FORMªí³æ°Ï:
Private Sub CommandButton1_Click()
If TextBox1 = "" Then Exit Sub
[B1] = TextBox1
With [B2]
.Formula = "=VLOOKUP(B1,'" & ThisWorkbook.Path & "\[¸ê®Æ®w.xls]û¤u¸ê®Æªí'!$A:$B,2,)"
.Value = .Value
End With
If IsError([B2]) Then
MsgBox "§ä¤£¨ì²Å¦Xªº©m¦W¡I¡@": [B1:B2] = "": Exit Sub
Else
[A1:L48].Name = ActiveSheet.Name & "!Print_Area"
ActiveSheet.PrintOut
Unload Me
End If
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
PrntChk = 0
End Sub
mm02.rar (23.25 KB)
|
|