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

¦p¦ó§Q¥ÎVBA¨Ó¹F¨ì "³sµ²" ®ÄªG?

¦^´_ 8# RCRG

³o¼Ë¤~¯à¤£¶} "­×§ïÀÉ" ¡A"¨Ï¥ÎÀÉ"¤S¯à¦P¨B§ó·s
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 10# ML089


    ¬°¤°»ò§Ú½d³ò¦Û¤v§ï¦¨¦p¤U¡AVBAÁÙ¬O·|¸õ¥X°ÝÃDµøµ¡©O

'VBAµ{¦¡©ñ¦b ¨Ï¥ÎÀÉ.XLS¤¤ ThisWorkbook
Private Sub Workbook_Open()
    xF = "'C:\Documents and Settings\®à­±\§Q¥ÎVBA§ó·s³sµ²\­×§ï¸ê®Æ§¨\[­×§ïÀÉ.xls]¤u§@ªíA'!R1C1:R500C81"
    Workbooks("¨Ï¥ÎÀÉ.xls").Worksheets("¤u§@ªía").Range("A1:CC500").FormulaArray = "=if(" & xF & "="""",""""," & xF & ")"
End Sub

TOP

¦^´_ 12# RCRG

§Ú´ú¸ÕÀ³¸Ó¨S¦³°ÝÃD

¥ý¶ÇÀɮפW¨Ó¬Ý¬Ý
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

½Æ»s¤º®e§t®æ¦¡¤Îµù¸Ñ, ¨S¤°»ò¤è«Kªk, ¦Ñ¹ê¥Î½Æ»s¶K¤W§a!!

Private Sub Workbook_Open()
Dim MyB As Workbook, xB As Workbook, xFile$
Set MyB = ThisWorkbook
xFile = ThisWorkbook.Path & "\­×§ï¸ê®Æ§¨\­×§ïÀÉ.xls"  '¸ô®|ÀɦW¦Û¦æ­×§ï
Application.ScreenUpdating = False
Set xB = Workbooks.Open(xFile, ReadOnly:=True)
xB.Sheets("¤u§@ªíA").[A1:H500].Copy MyB.Sheets("¤u§@ªía").[A1]
xB.Sheets("¤u§@ªíB").[AA1:AB20].Copy MyB.Sheets("¤u§@ªíb").[AA1]
xB.Close 0
End Sub

¨Ó·½Àɤâ°Ê¶}±Ò¦³¦h§Ö, ³oµ{¦¡´N¤@¼Ëªº§Ö, ¤Ï¤§¥çµM~~

TOP

¦^´_  ML089


    ¬°¤°»ò§Ú½d³ò¦Û¤v§ï¦¨¦p¤U¡AVBAÁÙ¬O·|¸õ¥X°ÝÃDµøµ¡©O

'VBAµ{¦¡©ñ¦b ¨Ï¥ÎÀÉ.XLS¤¤ ...
RCRG µoªí©ó 2016-1-25 12:22


¦^´_ 13# ML089

§Ú¤j·§§ä¨ì°ÝÃD©Ò¦b¤F¡A¦n¹³¬O­n§â²£¥Íªº°}¦C¤½¦¡¾ã­Ó²¾°£¡A¤~·|¥¿±`¡F
¤]´N¬O»¡¨Ï¥ÎÀɸ̡A¤£¯à¦³¸ò¤W¤@¦¸¤£¦P³sµ²ªº°}¦C¤½¦¡¡A¦³ªº¸Ü»Ý¥þ³¡²¾°£¡AÅý¥L±qªÅ¥Õ­¶¤¤¦A¶]·sªº³sµ²¥X¨Ó¡A¤~¤£­Pµo¥Í²§±`¡C
¥H¤W¬O§Ú¨Ï¥ÎM¤jª©ªº¤ß±o¡A¤]«D±`ÁÂÁ±z²Ä¤@®É¶¡¬°§Ú¸Ñµª¡C

TOP

¦^´_ 14# ­ã´£³¡ªL

©Ò¥H­ã¤jªºVBA¬O®M¥Î ½Æ»s¶K¤W ªº¤èªkÅo?

¨º§Ú·Q¤F¸Ñ¸Ô²ÓªºVBA¤º®e¬O 1. ½Æ»s¨Ó·½ª½±µ¶K¤WÂл\¥Ø¼Ð
                                         ÁÙ¬O    2. ½Æ»s¨Ó·½¡A²M°£¥Ø¼Ð¤º®e¡A¦A¶K¤W¥Ø¼Ð

¬O­þºØ¼Ò¦¡©O? ¦]¬°¦pªG¬O²Ä1­Ó¼Ò¦¡¡A¨º¥Ø¼Ð¥»¨Ó¦³VBA«ö¶s¡A¬O¤£¬O´NµLªkÂл\VBA«ö¶s¤F
¦]¬°­ã¤jªºvba¦pªG¨Ó·½¦³vba«ö¶s¦n¹³¤]·|¤@¨Ö½Æ»s¡A©Ò¥H¤£ª¾¹D·|¤£·|¨C¶}Àɤ@¦¸´N½Æ»s¶K¤W¶V¨Ó¶V¦h«ö¶s¹L¥h

TOP

¦^´_ 16# RCRG


«ö¶s¦³¤H·|©ñ¦b¸ê®Æ°Ï¶Ü¡H

¥i¥ý±N¨Ó·½¤u§@ªí³]¬°«OÅ@¡A¶K¦n«á¦A¸Ñ°£«OÅ@¡]«ö¶s¶·³]¬°¡ÐÂê©w¡^
With xB.Sheets("¤u§@ªíA")
      .Protect
      .[A1:H500].Copy MyB.Sheets("¤u§@ªía").[A1]
      .UnProtect
End With

TOP

¦^´_ 17# ­ã´£³¡ªL


    ¦pªG¨Ó·½ÀÉ( ­×§ïÀÉ)»P¥Ø¼ÐÀÉ(¨Ï¥ÎÀÉ)³£³Q«OÅ@µÛ¡A¨º»òVBA§Ú¦Û¤v§ï¦¨¦p¤U¡A¦ý¥Î°_¨Ó·Pı¦³ÂI©Ç©Çªº¡A¦n¹³¦³®É·|½Æ»s¦¨¥\¡A¦³®É·|¨S½Æ»s¨ì¡A¬O¨º¨à¦³°ÝÃD¶Ü?

Private Sub Workbook_Open()
Dim MyB As Workbook, xB As Workbook, xFile$
Set MyB = ThisWorkbook
xFile = ThisWorkbook.Path & "\­×§ï¸ê®Æ§¨\­×§ïÀÉ.xls"  '¸ô®|ÀɦW¦Û¦æ­×§ï
Application.ScreenUpdating = False
Set xB = Workbooks.Open(xFile, ReadOnly:=True)

ActiveSheet.Unprotect "123" '¥ý¨ú®ø«OÅ@

xB.Sheets("¤u§@ªíA").[A1:H500].Copy MyB.Sheets("¤u§@ªía").[A1]
xB.Sheets("¤u§@ªíB").[AA1:AB20].Copy MyB.Sheets("¤u§@ªíb").[AA1]
xB.Close 0

ActiveSheet.Protect "123" '­«·s³]©w«OÅ@
End Sub

TOP

¦^´_ 18# RCRG


¢°¡D¥ý¥h§Ë²M·¡¡@ActiveSheet¡@¬O¤°»ò·N«ä¡H¡@¡@¡e·í«e¤u§@ªí¡f¡A¥¦¤£¤@©w¥Nªí¬O¨Ó·½ªí©Î¥Ø¼Ðªí
¢±¡D½Æ»s®É¡A¨Ó·½ªíÀ³¬O«OÅ@¡A¥Ø¼Ðªí¬O¥¼«OÅ@¡A¤~¯à¥¿±`°µ¡e¶K¤W¡f¡A
¡@¡@¥i¥ý¤â°Ê¥h°µ¤@¦¸¡e½Æ»s¡D¶K¤W¡f¸Õ¸Õ´Nª¾¹D
¡@

TOP

¦^´_ 19# ­ã´£³¡ªL


    ­ì¨Ó¦p¦¹¡A"¤£¤@©w¬O¥Ø¼ÐÀɩΨӭìÀÉ" ³o¥y´£¿ô¤F§Ú;

¨º¥i¥H§ïÀ°§Ú¼g¦¨¶K¤W¥Ø¼ÐÀÉ«e¡A¥ý¸Ñ¶}¥Ø¼ÐÀɪº«OÅ@¡A¦A¶K¤W¥Ø¼ÐÀÉ¡A³Ì«á¦A«ì´_¥Ø¼ÐÀɪº«OÅ@¶Ü?

TOP

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