捕捉Enter鍵要用KeyDown事件,不能用KeyPress事件。 Private Sub TextBox1_KeyDown(ByVal KeyCode As...
若B2:F11不會有重複的數 在H2寫下=SUM(--(B2:F7=I2)*ROW(B2:F7))然後按下Ctrl+Shift+Enter
Array Formula In C1, Write =IF(COUNT(FIND(A$1:A$4,B1))>0,"Y","...
我沒測過,你試試看。 Sub test2() Dim bt as Range, r as Long, c as Long Dim wt as W...
Sub test() Dim myRng As Range, i As Long Set myRng = Cells(Rows.Cou...
我會用dateserial()讓VBA自己去計算日期大概是這樣寫 dim date1 as date, date2 as date, i as long, la...
Dim datestart as variant, dateend as variant lastrow = ActiveSheet.UsedRange.Ro...
試試看FileSystemObject sub find_new_excel() dim oFso as object, oFolder as obje...