ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¹Ú·Q¤u§@ªí

¦^´_ 2# myleoyes
  1. Sub ¦~«×¶µ¥Ø()
  2.    Dim Y, C%, TILE$, Sh As Worksheet
  3.    Sheets("­º­¶").Activate
  4.    On Error GoTo Er:
  5. Ag:
  6.     Y = InputBox("¿é¤J¦~«×" & TILE, , 99)
  7.     If Y = "" Then Exit Sub
  8.     Set Sh = Sheets(Y & "¦~«×¹Ú·Q")
  9.     With Range("A4:E4")
  10.         .Insert 'Shift:=xlDown
  11.         .Cells(0, 1).NumberFormatLocal = "YYYY/MM/DD"
  12.         .Cells(0, 1) = Y & "/1/1"
  13.         .Cells(0, 2) = Sh.Name
  14.         For I = 1 To Sh.Range("A:A").SpecialCells(xlCellTypeFormulas).Cells.Count
  15.             .Cells(0, I + 2) = Sh.Range("A:A").SpecialCells(xlCellTypeFormulas).Areas(I)
  16.         Next
  17.    End With
  18.    Exit Sub
  19. Er:
  20.    TILE = Chr(10) & "  *** §ä¤£¨ì " & Y & "¦~«×¹Ú·Q ¤u§@ªí ***"
  21.    Resume Ag
  22. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-8-3 18:51 ½s¿è

´_ 4# myleoyes
   Leov18-2.xls ¤¤¥u¦³¹Ú·Q  Leov18-1.xls ¤¤¦³¹Ú·Q,99,100¸Ì­±³£¬O¤½¦¡  
µ¹§Aªºµ{¦¡¤¤ .SpecialCells(xlCellTypeFormulas) ´N¬O¤½¦¡ªº°Ñ¼Æ
À³¸Ó¬O ¦p¹Ïªº»Ý¨D §A¨S¦³»¡²M·¡

  1. Sub ¦~«×¶µ¥Ø()
  2. Dim Y, C%, TILE$, Sh As Worksheet
  3. Sheets("­º­¶").Activate
  4. On Error GoTo Er:
  5. Ag:
  6. Y = Application.InputBox("¿é¤J¦~«×" & TILE, , 99)
  7. If Y = False Then Exit Sub
  8. If Y = "¹Ú·Q" Then
  9. Set Sh = Sheets("¹Ú·Q")
  10. Else
  11. Set Sh = Sheets(Y & "¦~«×¹Ú·Q")
  12. End If
  13. With Range("A4:E4")
  14. .Insert 'Shift:=xlDown
  15. .Cells(0, 1).NumberFormatLocal = "YYYY/MM/DD"
  16. .Cells(0, 1) = Y & "/1/1"
  17. .Cells(0, 2) = Sh.Name
  18. For I = 1 To Sh.Range("A:A").SpecialCells(xlCellTypeFormulas).Cells.Count
  19. .Cells(0, I + 2) = Sh.Range("A:A").SpecialCells(xlCellTypeFormulas).Areas(I)
  20. Next
  21. End With
  22. Exit Sub
  23. Er:
  24. TILE = Chr(10) & " *** §ä¤£¨ì " & Y & "¦~«×¹Ú·Q ¤u§@ªí ***"
  25. Resume Ag
  26. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# myleoyes
­×§ï½d³ò
I = 1
For Each A In Sh.Range("A3:A" & Rows.Count).SpecialCells(xlCellTypeFormulas).Cells
        .Cells(0, I + 2) = A
        I = I + 1
Next

TOP

¦^´_ 8# myleoyes
Formula->¤½¦¡  Ex:   Range("a5").Formula="=a1+a8"
R = InputBox("½Ð§ó§ï¤½¦¡", , ActiveCell.Formula)

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD