- ©«¤l
- 97
- ¥DÃD
- 33
- ºëµØ
- 0
- ¿n¤À
- 129
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-5-7
- ³Ì«áµn¿ý
- 2022-8-25
|
¦^´_ 1# s13030029
¤w¸Ñ¨M~~
´£¨Ñµ{¦¡½Xµ¹¤j®a°Ñ¦Ò- Sub ¶×¥X»sµ{°O¿ýªí()
- Titlename = ThisWorkbook.Sheets("»sµ{Àˬd°O¿ýªí").Range("H4").Value
- Dim ylFolder As String
- ylFolder = ThisWorkbook.Path & "\" & Titlename & "°O¿ýªí" '«ü©w¸ê®Æ§¨
- If Dir(ylFolder, vbDirectory) = "" Then MkDir ylFolder
-
- Dim stFileName As String
- Dim xPath As String
- xPath = Application.ActiveWorkbook.Path
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
-
- With ActiveSheet
- .Copy
- ActiveSheet.DrawingObjects.Delete
- XX:
- X = InputBox("½Ð¿é¤JÀɦW!!", "¥t¦s·sÀÉ", Titlename & " " & "ÀËÅç³ø§i")
- stFileName = ylFolder & "\" & X & ".xls"
- If X <> "" Then
- If Dir(stFileName) <> "" Then
- MsgBox "¤w¦³¬Û¦PÀɦW¡I"
- GoTo XX
- Else
- Application.ActiveWorkbook.SaveAs Filename:=ylFolder & "\" & X, _
- FileFormat:=xlExcel8
- MsgBox "Àx¦s¦¨¥\!"
- End If
- ElseIf X = "" Then
- MsgBox "¤w¨ú®øÀx¦s!!!"
- End If
- Application.ErrorCheckingOptions.BackgroundChecking = False
- Application.ActiveWorkbook.Close False
- End With
- Application.DisplayAlerts = True
- Application.ScreenUpdating = True
-
- End Sub
½Æ»s¥N½X °Ñ¦Ò¸ê®Æ¡Ghttps://analysistabs.com/excel-vba/check-file-exists-location-folder/ |
|