µ{¦¡½X¤U¡AÀɮפ¤½ÐÂIÀ»"¥t¦si-Link¸ô®|ÀÉ"°õ¦æ¥¨¶°¡AÁÂÁÂÀ°¦£~- Sub ¶×¥X»sµ{¦Ü¸ô®|ÀÉ()
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- If Cells(11, "A") Like "¥~Æ[" Then '¥~Æ[
- Cells(11, "F").Value = "D,1,1"
- Cells(11, "G").Value = "D,1,2"
- Cells(11, "H").Value = "D,1,3"
- Cells(11, "I").Value = "D,1,4"
- Cells(11, "J").Value = "D,1,5"
- End If
-
- lastRow = Sheets("»sµ{Àˬd°O¿ýªí").Columns(2).Find(What:="", LookIn:=xlValues, _
- SearchDirection:=xlNext, AFTER:=Range("B12")).Row
-
- For I = 12 To lastRow 'Range("A12").End(xlDown).Row
- If Cells(I, "B") <> "" Then
- Cells(I, "F").Value = "D," & Cells(I, "A").Value + 1 & ",1"
- Cells(I, "G").Value = "D," & Cells(I, "A").Value + 1 & ",2"
- Cells(I, "H").Value = "D," & Cells(I, "A").Value + 1 & ",3"
- Cells(I, "I").Value = "D," & Cells(I, "A").Value + 1 & ",4"
- Cells(I, "J").Value = "D," & Cells(I, "A").Value + 1 & ",5"
- Else
- End If
- Next
-
- For I = 47 To Range("A47").End(xlDown).Row
- If Cells(I, "B") <> "" Then
- If Cells(I, "B") <> "" Then
- Cells(I, "F").Value = "D," & Cells(I, "A").Value + 1 & ",1"
- Cells(I, "G").Value = "D," & Cells(I, "A").Value + 1 & ",2"
- Cells(I, "H").Value = "D," & Cells(I, "A").Value + 1 & ",3"
- Cells(I, "I").Value = "D," & Cells(I, "A").Value + 1 & ",4"
- Cells(I, "J").Value = "D," & Cells(I, "A").Value + 1 & ",5"
- Else
- End If
- End If
- Next
-
- Application.ScreenUpdating = True
- Application.DisplayAlerts = True
- Range("A11").Select
-
- Dim xlFolder As String
- xlFolder = ThisWorkbook.Path & "\" & "i-Link ¸ô®|ÀÉ" '«ü©w¸ê®Æ§¨
- If Dir(xlFolder, vbDirectory) = "" Then MkDir xlFolder
- Dim xPath As String
- xPath = Application.ActiveWorkbook.Path
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- Titlename = ThisWorkbook.Sheets("»sµ{Àˬd°O¿ýªí").Range("H4").Value
- With ActiveSheet
- .Copy
- ActiveSheet.DrawingObjects.Delete
- X = InputBox("½Ð¿é¤JÀɦW!!", "¥t¦s·sÀÉ", Titlename & " " & "»sµ{(¸ô®|ÀÉ)")
- If X <> "" Then
- Application.ActiveWorkbook.SaveAs Filename:=xlFolder & "\" & X, _
- FileFormat:=xlExcel8
- MsgBox "Àx¦s¦¨¥\¡I"
- ElseIf X = "" Then
- MsgBox "¤w¨ú®øÀx¦s!!!"
- End If
- Application.ErrorCheckingOptions.BackgroundChecking = False
- Application.ActiveWorkbook.Close False
- End With
-
- For I = 11 To Range("B11").End(xlDown).Row
- If Cells(I, "A") <> "" Then
- Cells(I, "F").Value = ""
- Cells(I, "G").Value = ""
- Cells(I, "H").Value = ""
- Cells(I, "I").Value = ""
- Cells(I, "J").Value = ""
- ElseIf Cells(I, "A") = "" Then
- Exit For
- End If
- Next
- For I = 47 To Range("A47").End(xlDown).Row
- If Cells(I, "A") <> "" Then
- Cells(I, "F").Value = ""
- Cells(I, "J").Value = ""
- Cells(I, "H").Value = ""
- Cells(I, "I").Value = ""
- Cells(I, "J").Value = ""
- ElseIf Cells(I, "A") = "" Then
- Exit For
- End If
- Next
-
- Application.DisplayAlerts = True
- Application.ScreenUpdating = True
-
-
- End Sub
½Æ»s¥N½X
test2.rar (40.14 KB)
|