¼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
|
¼g¤@Ó¥t¦s·sÀɪº¥¨¶°¡A¦ý¬O»Ýn.pdf file¡A¨º»òÀ³«ç§ï¼g¡H
¦pªGµª¡§¬O¡¨¡A¥¿±`¹B§@¡A¦ý¬Oµª¡§§_¡¨·|¸õ¨ì°£¿ù¼Ò¦¡¡A½Ð°Ýµª¡¨§_¡§µ¥¦p°£®ø¡A«ç»ò½s¼g¡H
Sub SaveAS()
'
' ¥¨¶°1¥¨¶°
'
¬O§_¥t¦s·sÀÉ = InputBox("¬O§_¥t¦s·sÀÉ? ¬O¡GY, §_¡GN", , "Y")
File = Application.Range("D6")
Name = Application.Range("M7")
ActiveWorkbook.SaveAs Filename:=File & "-" & Name & ".xlsm"
End Sub |
|
|
|
|
|
|
- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
¦^´_ 1# Blade - Sub SaveAS()
- ¬O§_¥t¦s·sÀÉ = MsgBox("¬O§_¥t¦s·sÀÉ?", vbYesNo)
- If ¬O§_¥t¦s·sÀÉ = vbYes Then
- File = Application.Range("D6")
- Name = Application.Range("M7")
- ActiveWorkbook.SaveAS Filename:=File & "-" & Name & ".xlsm"
- End If
- End Sub
½Æ»s¥N½X Excel 2010¨î§@PDF- Sub PrintPDF()
- ¬O§_¥t¦s·sÀÉ = MsgBox("¬O§_¥Î·í«e¶¨î§@PDF?", vbYesNo)
- If ¬O§_¥t¦s·sÀÉ = vbYes Then
- File = Application.Range("D6")
- Name = Application.Range("M7")
- ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
- File & "-" & Name & ".pdf", Quality:=xlQualityStandard, _
- IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
- End If
- 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
|
·PÁ¡I
¥t¤@Ó°ÝÃD¡A¦pªGÀɮצWºÙ¤w¸g¦s¦b¡Aµª"¬O"´N¦p±`»\¤Fªº¡A¦ýµª"§_"¤S«ç¼g©O¡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
|
¦^´_ 2# kimbal
·PÁ¡I
¥t¤@Ó°ÝÃD¡A¦pªGÀɮצWºÙ¤w¸g¦s¦b¡Aµª"¬O"´N¦p±`»\¤Fªº¡A¦ýµª"§_"¤S«ç¼g©O¡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
|
¦^´_ 4# Blade
¸Õ¸Õ¬Ý- Option Explicit
- Sub PrintPDF()
- Dim File_Name As String, xFile As String, xName As String
- xFile = Range("D6")
- xName = Range("M7")
- File_Name = xFile & "-" & xName & ".pdf"
- Do
- File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name)
- If File_Name = "" Then
- Exit Sub
- Else
- If Dir(File_Name) <> "" Then
- If MsgBox("ÀɮצWºÙ¸g¦s¦b,Âл\¥¦", vbYesNo) = vbYes Then
- Exit Do
- Else
- File_Name = ""
- End If
- End If
- End If
- Loop While Not UCase(File_Name) Like "*.PDF"
- Application.DisplayAlerts = False
- ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
- xFile & "-" & xName & ".pdf", Quality:=xlQualityStandard, _
- IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
- Application.DisplayAlerts = True
- 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-18 11:12
§Ú²{®Éªº½s½X¬O³o¼Ë
Sub SaveAS()
'
' Module2 Module
' invno
'
ActiveWorkbook.Save
¬O§_¥t¦s·sÀÉ = MsgBox("¬O§_¥t¦s·sÀÉ?", vbYesNo)
If ¬O§_¥t¦s·sÀÉ = vbYes Then
File = Application.Range("D6")
SNo = Application.Range("L7")
Name = Application.Range("M7")
ChDir "D:\Account book\INV"
ActiveWorkbook.SaveAS Filename:=File & "_" & SNo & "_" & Name & ".xlsm"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=File & "_" & SNo & "_" & Name & ".pdf", Quality:=xlQualityStandard _
, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End If
End Sub |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 7# GBKEE
·PÁ¡I¦¨¥\¤F¡C
ìÀɦWºÙ¬Oinv.xlsm
·í§Ú§¹¦¨¸ê®Æ®É
¦pªG§Ú¦P®É·Q¯d "xlsm" & "pdf"
¤§«á·|¦³¨âÓÀÉ®×
INV11345-©P¨ÌÀM.xlsm
INV11345-©P¨ÌÀM.pdf
¬O§_¥[¤J "¬õ¦âªº" ?
¥t¥~xNameªºx¬O§_¦³·N«äªº«ü¥Ü¡A¥ÎName¥i¥H¶Ü¡H
Option Explicit
Sub PrintPDF()
Dim File_Name As String, xFile As String, xName As String
xFile = Range("D6")
xName = Range("M7")
File_Name = xFile & "-" & xName & ".xlsm"
File_Name = xFile & "-" & xName & ".pdf"
Do
File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name)
If File_Name = "" Then
Exit Sub
Else
If Dir(File_Name) <> "" Then
If MsgBox("ÀɮצWºÙ¸g¦s¦b,Âл\¥¦", vbYesNo) = vbYes Then
Exit Do
Else
File_Name = ""
End If
End If
End If
Loop While Not UCase(File_Name) Like "*.xlsm"
Loop While Not UCase(File_Name) Like "*.PDF"
Application.DisplayAlerts = False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
xFile & "-" & xName & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Application.DisplayAlerts = True
End Sub |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 8# Blade
Name ,File ¬OVBA¨Ï¥ÎªºÃöÁä¦r ÅܼÆ,µ{§Ç¦WºÙnÁקK¨Ï¥Î- Option Explicit
- Sub PrintPDF()
- Dim File_Name As String, xFile As String, xName As String
- xFile = Range("D6")
- xName = Range("M7")
- File_Name = xFile & "-" & xName & ".xlsm"
- 'File_Name = xFile & "-" & xName & ".pdf"
- Do
- File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name)
- If File_Name = "" Then
- Exit Sub
- Else
- If Dir(File_Name) <> "" Then
- If MsgBox("ÀɮצWºÙ¸g¦s¦b,Âл\¥¦", vbYesNo) = vbYes Then
- Exit Do
- Else
- File_Name = ""
- End If
- End If
- End If
- 'Loop While Not UCase(File_Name) Like "*.XLSM" 'UCase(File_Name) ¤j¼g *.XLSM
- Loop While Not LCase(File_Name) Like "*.xlsm" 'LCase(File_Name) ¤p¼g *.xlsm
- Application.DisplayAlerts = False
- ActiveWorkbook.SaveAs Filename:=File_Name
- File_Name = Replace(LCase(File_Name), "*.xlsm", ".dbf") '°ÆÀɦW´À´«¬° "dbf"
- ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
- xFile & "-" & xName & ".pdf", Quality:=xlQualityStandard, _
- IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
- Application.DisplayAlerts = True
- 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
|
¦^´_ 9# GBKEE
·PÁ¡A¤Q¤À¦¨¥\¡C
§ÚªºINV File¬O©ñ©óD:\Account book\INV\INV.xlsm
§Ú¦Û¦æ¥[¤U¡§¬õ¦â¡§ªºn¨D¡A¦ý¬O¥t¦s.pdf«á¡Afile¨ÌµM¶]¤F¥h¡§§Úªº¤å¥ó¡¨¸ê®Æ§¨¤º¡A½Ð°Ý§Ú¬O§_©ñ¿ù¤F«ü¥Oªº¦ì¸m©O¡H
¥t¤@Ó°ÝÃD¡A¤µ¤Ñµo²{¤jÀY½¼ªº¦P¨Æ¡A¨C¦¸µoinvoiceªº®ÉÔ¡A¸g±`§Ñ°O§ó§ïinvoice no¡A©Ò¥H¦P¤@Óinvoice no¸g±`¥X²{©ó¤£¦Pªº«È¤á¦WºÙ¸Ì¡C
¨C¦¸µo³æ®É¡A¥t¦s«á³£¬O®æ¦¡ INV12345_·|û½s¸¹1_«È¤á¦WºÙ1.pdf
¨ì¤F¤U¤@±i³æ®É¡A¦o¤S§Ñ¤F§ó§ïINV12345¡A¦]¦¹·|¥X²{ INV12345_·|û½s¸¹2_«È¤á¦WºÙ2.pdf
½Ð°Ý¦³¨S¦³«ü¥O¤èªk¡A¦b¥t¦s®É¡A¥u°w¹ïInvoice noªº«½Æ§@´£¥Ü
'File_Name = xFile & "-" & xName & ".pdf"
ChDir "d:\Account book\INV\"
Do
File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name) |
|
|
|
|
|
|