Sub m_loss()
Dim d_m, r, r_loss As Integer
Dim date_new As Date
r = Range("a65536").End(xlUp).Row
r_loss = Sheets("LOSS").Range("a65536").End(xlUp).Row
zyname = InputBox("請輸入廠名")
d_m = Int(InputBox("請輸入月份date_m")) '注意數據轉換 2003,2007 好像版本不一樣
Sheets("LOSS").Cells(r_loss + 4, 1) = zyn...
Sub ai_insurance()
cr = Range("c65536").End(xlUp).Row
Set crng = Range(Cells(1, 3), Cells(cr, 3))
Dim arr(13) As Integer
For Each c In crng
Select Case Left(c, 2)
Case "1月"
arr(1) = c.Row
Case "2月"
arr(2) = c....
Sub mydate_deal()
Dim r_max, r_min, r As Integer
r_max = Range("b65500").End(xlUp).Row
r_min = Range("k65500").End(xlUp).Row
y = Year(Now())
dm = Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
If ((y Mod 400 = 0) Or (y Mod 4 = 0 And y Mod 100 <> 0)) Then
dm(1) = 29
...
Sub Macro5()
'
' Macro5 Macro
' qunxingw 2016/5/21
全部录制。
'
Sheets("Sheet3").Select
Range("E1").Select
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E1:E50")
Range("E1:E50").Select
Range("A1:C50").Select
Selection.Copy
Shee...
Sub abc()
Dim dm As Variant
Dim m, w, d, r As Integer
y = InputBox("put_year")
m = InputBox("put_month")
d = DateSerial(y, m, 1)
w = Weekday(d)
r = 3
Range("3:10").ClearContents
Cells(1, 1) = y & "-year," & m & "-month"
dm = Array(31, 28, 31, 30, 31, 30, 31, 31, 30, ...
Set rng = Sheets("洗沫汇总表").Range("a1:e50")
rng.Select
Selection.Clear
Sheets("洗沫汇总表").Cells(1, 1) = "部门"
Sheets("洗沫汇总表").Cells(1, 2) = "金质"
Sheets("洗沫汇总表").Cells(1, 3) = "金重"
Sheets("洗沫汇总表").Cells(1, 4) = "报表编号"
Sheets("洗沫汇总表").Cells(1, 5) = "表名"
ii...
Private Sub formjpsto過度表復制() ' ' Macro2 Macro 111,22222,3333 ' qunxingw 在 2015/11/21 錄製的巨集 ' ' Application.Run "'複製 -實驗.xls'!copyjpstemp" Application.Run "'複製 -實驗.xls'!deletemprow" Application.Run "'複製 -實驗.xls'!COPY過渡表" End Sub Private Sub 總表處理() Dim rs As Long Dim rm As Long rs = range("A6...