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

¼Æ¦r¦WºÙ¤u§@ªí

¼Æ¦r¦WºÙ¤u§@ªí

¤p§Ì¥Ø«e¸I¨ì¤@­Ó°ÝÃD
´N¬O¤p§Ì·Q¨Ï¥Îvba¦Û°Ê·s¼W¤£©w¼Æ¶qªº¤u§@ªí
¦Ó¥B¤u§@ªíªº¦WºÙ¬°¼Æ¦r¡A¨Ã¥B¦b«Ø¥ß¦n¸Ó¤u§@ªí«á¦b¸Ó¤u§@ªí¤§A1Àx¦s®æ¶ñ¤J¸ê®Æ
¤p§Ì¥H¤U¦C¼gªk¤@ª½¦³°ÝÃD
For i =1 to num
      uRng = Workbooks("a.xlsm").Worksheets("¥N¸¹").cell(i,1) <<<<<<<³oÃ䪺Àx¦s®æ©ñªº³£¬O¼Æ¦r¨Ò¦p1111¡B132¡B58752
      Workbooks("a.xlsm").Worksheets.Add.Name = uRng
     Workbooks("a.xlsm").Worksheets("uRng").cell(1,1) = ¬Y¨Ç¸ê®Æ <<<<<³o¤@¬q¤@ª½Åã¥Ü¦³°ÝÃD
     ±N¤W¤@¬q§ï¦¨Workbooks("a.xlsm").Worksheets(uRng).cell(1,1) = ¬Y¨Ç¸ê®Æ <<<<<<³o¼ËÁÙ¬O¿ù
     ¦pªG§ï¦¨ Workbooks("a.xlsm").Worksheets(str(uRng)).cell(1,1) = ¬Y¨Ç¸ê®Æ<<<<<<<³o¼ËÁÙ¬O¿ù@@~~~~
Next

½Ð°Ý¦U¦ì¤j¤j¤p§Ì¨ì©³­þÃä§Ë¿ù¤F
Àµ½Ð«ü¾ÉÁÂÁÂ

¦^´_ 1# pideo


§Aªº°ÝÃDÂI«Ü¦h¡A¤×¨ä¬O¸ê®Æ«¬ºAªº³¡¥÷

1.§AªºuRng  ¬O¤@­ÓÅܼƦWºÙ¡A¦pªG¥´¦¨"uRng"¡A¹q¸£´N·|§ä³o­Ó¦WºÙªº¤u§@ªí¡AÅãµM¬O§ä¤£¨ì

2.str(uRng)..............¥u¦³­È ¤~¯à¥Îstr³o­Ó¨ç¼Æ¡A¨Ò¦p1111Âà´«¦¨"1111"¡A¦ý¬O§AªºuRng¬OÅܼƦWºÙ............

3.¥¿½T¼gªk¬O¡GWorkbooks("a.xlsm").Worksheets(uRng).cells(1,1)    §A¤Ö¼g¤FS

4.¼gµ{¦¡¤£¥ý©w¸q¸ê®Æ«¬ºA¬O«Ü¤£¦nªº²ßºD¡A§AªºuRng ¸Ì­±¸Ëªº­È¬O¼Æ¦r¡A°²³]uRng=5¡A©Ò¥HWorksheets(uRng)¡A¥Nªí¹q¸£¥h§ä²Ä5­Ó¤u§@ªí

©Ò¥H½Ð¸É¤WDim Urng As String

§ó¥¿µ{¦¡¦p¤U¡A¥ý¨M±ø¥ó§Aªºnum­n¦³­È
  1. Dim Urng As String
  2. For i = 1 To num
  3.   Urng = Workbooks("a.xlsm").Worksheets("¥N¸¹").Cells(i, 1)
  4.   Workbooks("a.xlsm").Worksheets.Add.Name = Urng
  5.   Workbooks("a.xlsm").Worksheets(Urng).Cells(1, 1) = "¬Y¨Ç¸ê®Æ"
  6. Next
½Æ»s¥N½X

TOP

¦^´_ 2# n7822123


§ó¥¿§Ú²Ä2¶µ»¡ªk

2.Worksheets(str(uRng)).......................¥u¦³¼Æ­È ¤~¯à¥Îstr³o­Ó¨ç¼Æ¡A¨Ò¦p1111Âà´«¦¨"1111"¡A¦ý¬O§AªºuRng¬OÅܼƦWºÙ............

§A§âstr¨ç¼Æ§ï¦¨Cstr ´N¦æ¤F¡A°O¦ístr¨ç¼Æ¸Ì­±ªº¤Þ¼Æ¥u¯à¬O¼Æ­È¡A¤£¯à¬OÅܼƦWºÙ

§ó¥¿¦p¤U:
  1. For i = 1 To num
  2.   Urng = Workbooks("a.xlsm").Worksheets("¥N¸¹").Cells(i, 1)
  3.   Workbooks("a.xlsm").Worksheets.Add.Name = Urng
  4.   Workbooks("a.xlsm").Sheets(CStr(Urng)).Cells(1, 1) = "¬Y¨Ç¸ê®Æ"
  5. Next
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2015-11-2 02:32 ½s¿è

¦^´_ 3# n7822123


©êºp¡A§Ú»¡¿ù°Õ

­è­è¥h¬d¤F¤@¤Ustr ³o­Ó¨ç¼Æ¡A¥L«e­±·|«O¯d¤@­Ó¦r²Å¥Î¨Ó§PÂ_¥¿­t¸¹¡A¸Ì­±¬O¥i¥H©ñÅܼƪº

str(-1234)="-1234"   ³o¨Sª§Ä³¡A¦ý¬O

str(1234)=" 1234"  «e­±·|¦³¤@­ÓªÅ®æ¤£¬O"1234"

©Ò¥Hµ²½×´N¬O......strÁÙ¬O¤Ö¥Î§a..........§Ú³£¥ÎCstr

TOP

³oÃä§Ñ¤F¥´¤Ws©êºp
·PÁ¤j¤jªº«ü¾É
¨Ï¥Î¤FCstr°ÝÃD´N¸Ñ¨M¤F
¤p§Ì¨ü¯q¨}¦h
·PÁÂ

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-11-3 07:27 ½s¿è

¦^´_ 5# pideo
  1. 'Worksheets(¯Á¤Þ­È) ->¼Æ¦r: ¨Ì¬¡­¶Ã¯¤W¤u§@ªí±Æ¦C²Ä¤@­Ó¨ì³Ì«á¤@­Ó
  2. 'Worksheets(¤å¦r)   ->³o¬¡­¶Ã¯¤W¤u§@ªí¥H³o¦r¦ê©R¦Wªº¤u§@ªí
  3. Option Explicit
  4. Sub Ex()
  5.     Dim i As Integer , num As Integer, uRng As String
  6.     With Workbooks("a.xlsm")
  7.         For i = 1 To num
  8.             uRng = .Worksheets("¥N¸¹").Cells(i, 1).Text  'Àx¦s®æªº¤å¦r
  9.             .Worksheets.Add.Name = uRng
  10.             .Worksheets(uRng).Cells(1, 1) = ¬Y¨Ç¸ê®Æ
  11.             
  12.         Next
  13.     End With
  14. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

Sheets(uRng & "").Cells(1, 1) = ¬Y¨Ç¸ê®Æ

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD