如何让excel的工作表自动排列?

2024-12-15 14:51:40
推荐回答(1个)
回答1:

Hi我或者把文件发到evilfarmer@126.com

Private Sub CommandButton1_Click()
star = 5
end1 = [d65535].End(xlUp).Row
Sheets(Cells(star, 4).Value).Move after:=Sheets("工序流程")
For i = star + 1 To end1
If Cells(i, 4).Value <> "" Then
Sheets(Cells(i, 4).Value).Move after:=Sheets(Cells(i - 1, 4).Value)
End If
Next
Sheets("工序流程").Select
End Sub