瀏覽單個文章
艾唯
Regular Member
 
艾唯的大頭照
 

加入日期: Aug 2004
文章: 68
不知道這段是不是
=============================================
Sub 進貨確定()
'
' 進貨確定 巨集表
' sd 在 2000/6/17 錄製的巨集
'

'
Sheets("進貨列印").Visible = True
Sheets("進貨列印").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("進貨資料").Visible = True
Sheets("進貨資料").Select
Range("A17").Select
ActiveSheet.Unprotect
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Range("A4:H14").Select
Selection.Copy
Range("A17").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("A17").Select
Application.CutCopyMode = False
Range("A16:H30000").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Range("E1:E2"), Unique:=False
ActiveWindow.SmallScroll Down:=-9
Selection.EntireRow.Insert
Range("A19").Select
Selection.CurrentRegion.Select
Selection.EntireRow.Delete
Range("A17").Select
Selection.EntireRow.Delete
ActiveSheet.ShowAllData
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("進貨資料").Visible = False
Sheets("進貨設定").Select
Range("D7:E16").Select
Selection.ClearContents
Range("D7").Select
Sheets("進貨設定").Visible = False
Sheets("進貨列印").Visible = False
ActiveWorkbook.Save
Sheets("進貨首頁").Select
Range("D8:H8").Select

End Sub
Sub 進貨設定()
'
' 進貨設定 巨集表
' sd 在 2000/6/19 錄製的巨集
'

'
Sheets("進貨設定").Visible = True
Sheets("進貨設定").Select
Range("D4").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("D4").Select

End Sub
Sub 進貨查詢確定()
'
' 進貨查詢確定 巨集表
' sd 在 2000/6/18 錄製的巨集
'

'
Sheets("進貨資料").Visible = True
Sheets("進貨資料").Select
ActiveSheet.Unprotect
Sheets("進貨查詢").Select
ActiveSheet.Unprotect
Range("A10").Select
Selection.CurrentRegion.Select
Selection.ClearContents
Range("A10").Select
Sheets("進貨資料").Range("A16:G5000").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("b5:e6"), CopyToRange:=Range("A10"), Unique:=False
Selection.CurrentRegion.Select
With Selection.Interior
.ColorIndex = 34
.Pattern = xlSolid
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("C10").Select
Selection.Sort Key1:=Range("C11"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("進貨資料").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("進貨資料").Visible = False
Sheets("進貨查詢").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("A10").Select

End Sub
Sub 進貨離開()
'
' 進貨離開 巨集表
' sd 在 2000/6/17 錄製的巨集
'

'
Range("d4,D7:E16").Select
Selection.ClearContents
Range("D7").Select
Sheets("進貨設定").Visible = False
Sheets("進貨首頁").Select
Range("D8:H8").Select

End Sub
Sub 進貨查詢()
'
' 進貨查詢 巨集表
' sd 在 2000/6/19 錄製的巨集
'

'
Sheets("進貨查詢").Visible = True
Sheets("進貨查詢").Select
Range("b6").Select
End Sub
Sub 進貨查詢離開()
'
' 進貨查詢離開 巨集表
' sd 在 2000/6/19 錄製的巨集
'

'
ActiveSheet.Unprotect
Range("A10").Select
Selection.CurrentRegion.Select
Selection.Interior.ColorIndex = xlNone
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.ClearContents
Range("b6:e6").Select
Selection.ClearContents
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("C6").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("進貨首頁").Select
Range("D8:H8").Select
End Sub
Sub 進貨查詢清除()
'
' 進貨查詢清除 巨集表
' sd 在 2000/6/19 錄製的巨集
'

'
ActiveSheet.Unprotect
Range("A10").Select
Selection.CurrentRegion.Select
Selection.Interior.ColorIndex = xlNone
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.ClearContents
Range("b6:e6").Select
Selection.ClearContents
Sheets("進貨查詢").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("B6").Select

End Sub
__________________
喜歡發呆的小咪...........+喜歡睡覺的阿比...............................他們居然會玩GBA
舊 2005-11-24, 10:41 AM #5
回應時引用此文章
艾唯離線中