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

sheet name °ÝÃD

¥»©«³Ì«á¥Ñ luhpro ©ó 2010-7-27 21:03 ½s¿è

¦^´_ 9# jackdream

­è­è´ú¸Õµo²{¯uªº¤£¯à¥Î,
¦]¬°·|¥X²{ "°}¦C¯Á¤Þ¶W¥X½d³ò" ªº¿ù»~°T®§.

With Workbooks(1)
  MyName = .Sheets(1).Name
End With
¤W­±³o¼Ë¥i¥H.

With Workbooks("spss.xls")
  MyName = .Sheets(1).Name
End With
¤W­±³o¼Ë´N¤£±µ¨ü

¥i¯à»Ý­n¥Î¨ä¥L¤è¦¡¨Ó¤Þ¥Î,
³o¤]¬O§Úı±o Excel VBA ³Ì¤£¤H©Êªº¦a¤è,
«Ü¦h¦a¤è©ú©úª½Ä±ªºÀ³¸Ó³o¼Ë´N¹ï°¾°¾´N¬O¤£¯à¥Î. > <
==========================================================================================================
¦^´_ 6# basarasy
¦^´_  kimbal
¦]¬°§Ú·Q­n sheet1.name   ¥Î³o­Ósheet§ï¦W¤F³£¥i¥Hrun¨ì
eg.  sheet1(sheet1)>sheet1(¤H¦W ...
basarasy µoªí©ó 2010-7-27 19:53


¦^´_ 10# basarasy
¦^´_ 9# jackdream
Workbooks("book2.xls").Activate
MyName = Sheets(1).Name ³o¥y¬O¥ªÃä¨ì¥k²Ä1­Ósheet
¦pªG¶Ã¤F  sheet3 sheet2 sheet1  ´N¤£¯à«ü©wsheet1¤F.  


§A¤W­±³o¨â­Ó±Ô­z¦ü¥G¦³ÅÞ¿è¤WªººÃ¸q,
¤@¤è­±§A§Æ±æ Sheet §ï¦W¤FVBAµ{¦¡¤´µM¥i¥H°Ñ¦Ò¨ì­ì¨Ó¨º­ÓSheet(§Ç¦C¦ì¸m¤£ÅÜ)
¥t¤@¤è­±§A¤S§Æ±æSheet §ï¦W¤FVBA¤W³QÂù¤Þ¸¹¬A©·ªº¦WºÙ¤å¦r¯à¸òµÛ§ï¦n°Ñ¦Ò¨ì¬Û¦P¦WºÙªºSheet.(§Ç¦C¦ì¸m¤£¤@¼Ë¤F)
³o¼Ë¦n¹³¤£¤Ó¥i¯à°µ¨ì.

TOP

¦W¦r¤£ª¾¹D,©m¤ó¤£ª¾¹D,¦í¦b¨º¸Ì³£¤£ª¾¹D...

©ÎªÌ,¥i¥H¥Î­¶¤º®e¨Ó¤À a1/a2...¦³¨Ç¤°»ò´N¶}©l¤u§@¤§Ãþ
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_  jackdream

«Ü¦h¦a¤è©ú©úª½Ä±ªºÀ³¸Ó³o¼Ë´N¹ï°¾°¾´N¬O¤£¯à¥Î.
With Workb ...
luhpro µoªí©ó 2010-7-27 20:50


'«Ü¦h¦a¤è©ú©úª½Ä±ªºÀ³¸Ó³o¼Ë´N¹ï°¾°¾´N¬O¤£¯à¥Î. '
   me2
¨º»ò¦³¤èªklook¤F sheet1¦Üsheet3¤£¯à ²¾°Ê?
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

'«Ü¦h¦a¤è©ú©úª½Ä±ªºÀ³¸Ó³o¼Ë´N¹ï°¾°¾´N¬O¤£¯à¥Î. '
   me2
¨º»ò¦³¤èªklook¤F sheet1¦Üsheet3¤£¯à ²¾ ...
basarasy µoªí©ó 2010-7-27 21:34


§Ú·QÀ³¸Ó¤£¬O Sheet ¯à¤£¯à²¾°Ê¦ì¸mªº°ÝÃD,
¦Ó¬OÀ³¸Ó­n¥ý½T»{§A§ì¨ú¸ê®Æ Sheet ªº°ò·Ç¦b­þ,
¬Ý¬O­n¥H Sheet ªº "Name ¤å¦r" ¬°¼Ðªº,
ÁÙ¬O­n¥H Workbook ¤Wªº "²Ä´X­Ó"  Sheet ¬°¼Ðªº.

TOP

¦^´_ 10# basarasy
  1. Dim sh As Worksheet
  2. With Workbooks.Open(ThisWorkbook.Path & "\book2.xls")
  3. For Each sh In .Sheets
  4.    If sh.CodeName = "Sheet1" Then MyName = sh.Name
  5. Next
  6. End With
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 15# Hsieh

ÁÂÁ±j¤jªºHsieh ¤j¤j.
¦pªG¥Î3­Ósheet name ³o¼Ë¼g¹ï¶Ü

Dim sh1 As Worksheet
Dim sh2 As Worksheet
Dim sh3 As Worksheet
With Workbooks.Open(ThisWorkbook.Path & "\book2.xls")
For Each sh1,sh2,sh3 In .Sheets
   If sh1.CodeName = "Sheet1" Then MyName1 = sh.Name
  If sh2.CodeName = "Sheet1" Then MyName2 = sh.Name
  If sh3.CodeName = "Sheet1" Then MyName3 = sh.Name
Next
End With
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-7-28 17:45 ½s¿è

¦^´_ 16# basarasy


    §Aªº¥N½X¯à¹B¦æ¶Ü?
¥ý§â°ò¥»»yªk·dÀ´
http://forum.twbts.com/viewthread.php?tid=33&extra=page%3D1
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ basarasy ©ó 2010-7-29 17:34 ½s¿è

¦^´_ 17# Hsieh

³o­Ó¥i¥Hrun¤F^^
Dim sh As Worksheet
With Workbooks.Open(ThisWorkbook.Path & "\book2.xlsx")
For Each sh In .Sheets
   If sh.CodeName = "Sheet1" Then MyName1 = sh.Name
   If sh.CodeName = "Sheet2" Then MyName2 = sh.Name
   If sh.CodeName = "Sheet3" Then MyName3 = sh.Name
   
Next
End With
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD