Public Sub 考勤 生成DLL

2021-07-30 13:00:30 字數 2028 閱讀 8471

public sub 考勤()

on error resume next

selection.insert shift:=xltoright, copyorigin:=xlformatfromleftorabove

selection.insert shift:=xltoright, copyorigin:=xlformatfromleftorabove

selection.insert shift:=xltoright, copyorigin:=xlformatfromleftorabove

selection.insert shift:=xltoright, copyorigin:=xlformatfromleftorabove

selection.insert shift:=xltoright, copyorigin:=xlformatfromleftorabove

selection.insert shift:=xltoright, copyorigin:=xlformatfromleftorabove

selection.numberformatlocal = "h:mm;@"

'  with selection

'  .horizontalalignment = xlcenter

'  .verticalalignment = xlcenter

'  .wraptext = false

'  .orientation = 0

'  .addindent = false

'  .indentlevel = 0

'  .shrinktofit = false

'  .readingorder = xlcontext

'  .mergecells = false '

'  end with

end if

'if rng = "最早簽到時間" then colu_c = rng.column

if rng like "最早簽到時間" then colu_c$ = vba.split(rng.address, "$")(1)

if rng like "最晚簽到時間" then colu_l$ = vba.split(rng.address, "$")(1)

if rng like "簽到標準" then colu_cs$ = vba.split(rng.address, "$")(1)

if rng like "簽離標準" then colu_ls$ = vba.split(rng.address, "$")(1)

if rng like "出勤狀態" then colu_zk$ = vba.split(rng.address, "$")(1)

next

'declare function kqcopy lib "c:/windows/kaoqin1.dll" () '

'kq365為vb中類模組名稱:輸入完new後,敲空格鍵,直接出現選擇列表框,從中選擇「kq365」

' kk可任意命名

'introw = [a655536].end(xlup).row

dim i as integer

for i = 2 to introw step 1

' myarr2 = kk.kq(tcs, tc, tls, tl, zk)

next

'kq為vb中要執行的模組的名稱:輸入完kk.後,直接出現選擇列表框,從中選擇「kq365」

'kq為vb中的過程或函式名稱,從列表中選的

set kk = nothing '釋放類資源

end sub

問題集錦:

q1執行時錯誤91 物件變數或with塊變數未設定

目的:為了巨集外觀簡單,便於移植和呼叫 我用vb將excel中vba名為attendance的過程(sub)封裝成attend.dll,其子類attend365。回到excel,我建建乙個巨集,呼叫attend.dll,**如下 sub a()

dim aa as attend365

aa.考勤

end sub> 結果如上圖。

python考勤系統 使用Djang的考勤系統

型號attendance choices absent absent present present class head of department models.model first name models.charfield max length 200 last name models.c...

每日考勤統計

最近 一直在做公司的每日考勤這一塊,用的是mysql 在寫的時候遇到了不少的麻煩 其一在選取有效工作日時 attendance time 存的是考勤資料,atte holidays 這裡面存的是節假日的資料 我用了一條sql語句來查詢 select distinct date format tt.a...

考勤打卡相關

打卡 call function hr person read work schedule exporting begin date p begda end date p endda grouping dws grouping attendence grouping substitute read ...