¼g¤@Ó¥t¦s·sÀɪº¥¨¶°¡A¦ý¬O»Ýn.pdf file¡A¨º»òÀ³«ç§ï¼g¡H
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ 17# GBKEE
:) ¦¨¥\¤F¡A·PÁ¡I
½Ð°Ýª©¤j§A§ï¤F¨º¸Ì©O¡H§Ú¬Ý¤F´X¹MÁÙ¬O§ä¤£¨ì¡A¤£¦P¤§³B¡C- If Dir("d:\Account book\INV\*" & xSNo & "*.pdf ") <> "" Then
- MsgBox "¡iª`·N¡j¦¹¦¬¾Ú½s¸¹ " & xSNo & " ¦«e¤w¶}¥X¡A½Ð«·s¿é¤J¡C"
- Exit Sub
- End If
½Æ»s¥N½X ¦pªG§Ú·Q§âcode§ï¦¨¦p¤U¡A¤£½×¬O xFile¡BxSNo¡BxName¡A¬O§_³£¬O©ñ¦b¦P¤@¦ì¸m¡H- If Dir("d:\Account book\INV\*" & xFile & "*.pdf ") <> "" Then
- MsgBox "¡iª`·N¡j¦¹¦¬¾Ú½s¸¹ " & xFile & " ¦«e¤w¶}¥X¡A½Ð«·s¿é¤J¡C"
- Exit Sub
- End If
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¥»©«³Ì«á¥Ñ Blade ©ó 2012-12-22 14:30 ½s¿è
¦^´_ Blade
20# If Dir("d:\Account book\INV\*" & " xSNo " & "*.pdf ") "" Then
¦h¤F¨âÓ" , " ...
GBKEE µoªí©ó 2012-12-22 11:45
¦¨¥\¤F:D
§Ú²{®É¥Î¤F¤@Ó¤ñ¸û²Âªº¤èªk¡A¥h¥´¤J¦¬¾Ú½s¸¹¡A
«K¬O«ö¤@¤U¦¬¾Ú½s¸¹¹j¾Fªº¬õ¦â«ö¶s¡A«K·|¸õ¨ìinvno¨ºsheet¤§«á«ö
¤@¤Uªø¤è¬õ¦â«ö¶s¡A«K°Å¶K¦^¦¬¾Ú½s¸¹¨º³B¡A
¨C¤@¦¸³£¬O³o¼Ë¡C
¦pªG¬õ¦â¨º¦Cªº½s¸¹¥Î§¹¡A«K«ö¤@¤Uºñ¦âªº«ö¶s¡A§â¨º¦æªº½s¸¹°Å¶K¨ì³Ì¥ª±¬õ¦â«ö¶s³B¨Ó¸É¥R
½Ð°Ý¦³¬Æ»ò¦nªº¤è¦¡¥h¶W¶V³o¤èªk¡H |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-22 16:57 ½s¿è
¦^´_ 24# Blade - Option Explicit
- Sub ¥t¦s·sÀÉ´ú¸Õ()
- Dim File_Name As String, xFile As String, xSNo As String, xName As String
- xFile = Range("D6")
- xSNo = Range("L7")
- xName = Range("M7")
- File_Name = xFile & "_" & xSNo & "_" & xName & ".pdf"
- ActiveWorkbook.Save
- ChDrive "D:\" '¤wÂà´«ºÏºÐ¾÷ ³o¦æ¤£»Ýn If Mid(CurDir, 1, 1) <> "d" Then ChDrive "d:\"
- ChDir "d:\Account book\INV\"
- If Dir("d:\Account book\INV\*" & xSNo & "*.pdf ") <> "" Then
- MsgBox "µo²¼½s¸¹ " & xSNo & " ¤w¶}¥X"
- Exit Sub
- End If
- Do
- File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name)
- If File_Name = "" Then
- Exit Sub
- Else
- If Dir(File_Name) <> "" Then
- If MsgBox("¡iª`·N¡jÀɮצWºÙ¤w¸g¦s¦b¡C¬O§_nÂл\¥¦¡H¦pÂл\¥¦¸ê®Æ±N·|³Q§ó·s¡C", vbYesNo) = vbYes Then
- Exit Do
- Else
- File_Name = ""
- End If
- End If
- End If
- Loop While Not UCase(File_Name) Like "*.PDF"
- ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=xFile & "_" & xSNo & "_" & xName & ".pdf", Quality:=xlQualityStandard _
- , IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
- µo²¼§ó·s
- End Sub
½Æ»s¥N½X- Sub µo²¼§ó·s()
- Dim xSNo As Range, i As Integer, y As Integer, R As Integer, RR As Integer
- Set xSNo = Range("L7")
- y = Len(xSNo) '[µo²¼½s¸¹]ªº¦r¦êÓ¼Æ
- For i = 1 To y
- If R = 0 And Mid(xSNo, i, 1) Like "[0-9]" Then R = i '§ä[µo²¼½s¸¹]¤¤²Ä¤@ӼƦr
- If Mid(xSNo, i, 1) Like "[!0-9]" Then RR = i '§ä[µo²¼½s¸¹]¤¤³Ì«áªº¤å¦r
- Next
- If RR > R Or R = 0 Or xSNo = 0 Then '¼Æ¦r¦b¤å¦r¤§«e(©Î¥u¦³¤å¦r),¥u¦³¼Æ¦r
- MsgBox " µo²¼¦³»~ !!!"
- Else
- xSNo = Mid(xSNo, 1, R - 1) & Format(Mid(xSNo,R) + 1, String((y - R + 1), "0"))
- End If
- '¦p y - R + 1 = 5
- '¦p :Format(568, String((y - R + 1), "0")) => Format(568, "00000") => 5¦ì¼Æ: 00568
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ Blade
GBKEE µoªí©ó 2012-12-22 16:31
§Ú¦binvoice sheet¥[¤F¤@Óclick key¡A«Y¥hݯ student sheet ªº¾Ç¥Í¸ê®Æ¡AInputbox¦¨¥\¸õ¥X¨Ó¡A§ÚÁä¤J·|û½s¸¹«á¡A¨S¦³¸õ¨ì¨º·|ûªº"¦C"¡A½Ð°Ý¤í¯Ê¤F¬Æ»ò«ü¥O¡H
¥t¥~¨ºÓInputBox¬O¸õ¨ìstudent sheet¶}±Ò¡A¦pªG§Ú·Q¨ºÓInputBox°±¯d¦binvoice¡A¨ì§ÚÁä¤J¾Ç¥Í¸ê®Æ«á¡A¤~¸õ¨ìstudent sheet¥i¥H¶Ü¡H- Sub FindStudent()
- Sheets("student").Select
- InputBox ("½Ð¿é¤J¾Ç¥Í ¡£½s¸¹¡¤ ©Î ¡£¦WºÙ¡¤")
- Cells.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
- :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
- False, MatchByte:=False, SearchFormat:=False).Activate
- Exit Sub
-
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
§Ú¤µ¦¸¤S¹J¨ìÂ÷ÃD¡C
½Ð«ü±Ð
¦«e¸g¤j¤j«ü±Ð¤U¡A¼g¤F¥H¤U«ü¥O¡C
Rang³¡¤À¡A«ü©w¤FA3:B3¡A¦ý¬O§Ú¤£·Q«ü©wA3:B3¡A¨C¦¸§Ú³£¦Û¤v¿ï¤£¦PRang¡A¨º»ò§ÚÀ³«çקï¡H- Sub StudentCopy()
- Selection.Copy
- Range("A3:B3").Select
- Sheets("invoice").Select
- Range("L7").Select
- ActiveSheet.Paste
- Application.CutCopyMode = False
- Range("K7").Select
- End Sub
½Æ»s¥N½X §Ú¦Û¤v¸Õק令³o¼Ë¡A¦ý³£¬O¥X¿ù»~¡C- Range(",").Select
- Selection.Copy
- Sheets("invoice").Select
- Range("L7").Select
- ActiveSheet.Paste
- Application.CutCopyMode = False
- Range("K7").Select
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ Blade
Range(",").Select
Âù¤Þ¸¹¤º¬OÀx¦s®æªº¦ì¸mA1¤å¦r®æ¦¡
GBKEE µoªí©ó 2014-1-16 07:43
À³¸Ó¬O³o様»¡¡G
§Ú²{®É¨C¤@¦ì·|û³£°µ¤F¤@ÓÁäµ¹¥LÌ¡A¥un«ö¤U¨ºÁä«K·|§âAB·|û½s¸¹¤Î¦WºÙ¤@¦Pcopy¨ìinvoice¨º¶ªº¥u©w°Ï¡C
«á¨Óµoı¤H¼Æ¼Wªø¤j¤F¡A§Ú¨S¥i¯à¨C¦ì·|û¤]µ¹¥L¤@ÓÁä¡A¦]¦¹§Ú°µ¤F¤@Ó"¹Ï¤ù"¥k¤W¯»¦âªº¿ï¨úÁä¡A§Ú¥un«ü¦V·|û½s¸¹¦A«öshift¦A¿ï¦WºÙ¡A¤§«á¦A«ö¤U¤@¯»¦âÁä«K¦¨¥\§â·|û½s¸¹¤Î¦WºÙ¤@¦Pcopy¨ìinvoice¡C
¦ý²{¦b§Ú¦w±Æ¤F¥ªO¹q¸£µ¹«e½u«È¤á±Mû¡A¦pªG¥Î¤â«ü¥h¾Þ±±¡An¿ïA½s¸¹¤ÎB¦WºÙ¬O¦³ÃøÃDªº¡A©Ò¥H§Ú·Qªº¤èªk¬O¡A§Ú«ü¦V·Qnªº·|û½s¸¹¡A¦ý·í§Ú«ö¤@¤U¿ï¨úÁä¡A«K¯à¦Û°Ê¦a³s¦P·|û¦WºÙ¤]¤@°_copy¡A¨ìinvoice¡C |
|
|
|
|
|
|