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

½Ð¤j¤j­Ì¨ó§U¤F¸Ñ¿z¿ï°ÝÃD,

½Ð¤j¤j­Ì¨ó§U¤F¸Ñ¿z¿ï°ÝÃD,

¤j¤j­Ì, ¤p§Ì¹ïvbaª¾ÃѦ³­­, ªñ¤é¤p§Ì´X¸g¨¯­W¤~§¹¦¨¤F¤@­Óº¡¥H¬°¥i¦æªº¿z¿ïµ{¦¡, ¦ý·í¥Î®É­ì¨Ó¬O¦æ¤£³q,
¬G¨D±Ð¦U¤j¤j¯à§¹¦¨¸Óµ{¦¡, ªþÀÉ, ÁÂÁÂ!!

¤p§Ìªºµ{¦¡½X¦b¤u§@ªíµ{¦¡°Ï, ·Ð½Ð¦U¤j¤j¨ó§U,

¿z¿ï.rar (17.45 KB)
hong912

¤j¤j­Ì, ¤p§Ì¹ïvbaª¾ÃѦ³­­, ªñ¤é¤p§Ì´X¸g¨¯­W¤~§¹¦¨¤F¤@­Óº¡¥H¬°¥i¦æªº¿z¿ïµ{¦¡, ¦ý·í¥Î®É­ì¨Ó¬O¦æ¤£³q,
...
hong912 µoªí©ó 2013-11-3 14:10

¦³Ãö§Aªþ¥óÀɮפ¤¤§ abc() ¡A½Ð§Aµyµy»¡©ú¤@¤U §A¹ê»Ú¨ì©³·Q­n°µ¬Æ»ò¡H
·Qªk¦p¦ó¡H µ{¦¡½X¤¤«á¦³ end if «e­±«oµL if, ÁÙ¦³ len(XXX) ¡H
ÁÙ¦³¹LÂoªº±ø¥ó <> ¬Æ»ò¡H

TOP

¦^´_ 2# c_c_lai

ÁÂÁ¤j¤j¦^À³, abc¤£¹L¬Oµ{¦¡¦WºÙ, ¨Ã¨S¦³¹ê½è§@¥Î, ©ÎªÌ³o¼Ë»¡, ¤p§Ì»Ý¨D¤@¿z¿ïµ{¦¡, ·í¤p§Ì«ö¤U«ö¶s, ¼u¥X¤@®Ø¬[, ¥u­n¿é¤J¤@¦r, ¤u§@ªí2«K§â¤u§@ªí1¤ºcÄæ¦ì¦WºÙ, ©Ò¦³¦³¬ÛÃö¦r¦WºÙªº¸ê®Æ¦CÅã¥Ü©ó¤u§@ªí2 ¤º,
¦Ü©ó¤p§Ì©Ò¿×µ{¦¡, ¥»´N¬O¤£­È¤@´£,
ÁÂÁÂÁÂ!
hong912

TOP

¦^´_ 3# hong912
½Ð±Nµ{¦¡½Æ»s©ó ThisWorkbook ¤º¡G
  1. Option Explicit

  2. Sub Ex()
  3.     Dim ·Ç«h1 As String, rngFilter As String
  4.    
  5.     ·Ç«h1 = InputBox("¿é¤J¤@¦r (·Ç«h)")
  6.     If ·Ç«h1 = "" Then Exit Sub
  7.    
  8.     With Sheets("Sheet1")
  9.         Sheets("Sheet2").Cells.Clear
  10.         rngFilter = "*" & ·Ç«h1 & "*"
  11.         .[AA1] = "©m¦W"
  12.         .[AA2] = rngFilter
  13.         .Range("A3").CurrentRegion.AdvancedFilter xlFilterCopy, .[AA1:AA2], _
  14.                      CopyToRange:=Sheets("Sheet2").Range("A3"), Unique:=True
  15.     End With
  16. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# c_c_lai

·PÁ¦^À³, ·|²Ó¤ß¾Ç²ß, ¯¬§Ö¼Ö, ÁÂ!!
hong912

TOP

¥»©«³Ì«á¥Ñ joey0415 ©ó 2013-11-7 10:55 ½s¿è

§ï¸ô®|
D:\¿z¿ï.xls

»PSQL»yªk´N¯à§ä¨ì§A·Q­nªº
select * from [Sheet1$] where ©m¦W='¦ó¤¯¼w'
  1. Sub Macro1()
  2. '
  3. ' Macro1 Macro
  4. ' joey ¦b 2013/11/7 ¿ý»sªº¥¨¶°
  5. '

  6. '
  7.     With ActiveSheet.QueryTables.Add(Connection:=Array( _
  8.         "OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=D:\¿z¿ï.xls;Mode=Share Deny Write;Extended Properties=""HDR=" _
  9.         , _
  10.         "YES;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB:" _
  11.         , _
  12.         "Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password" _
  13.         , _
  14.         "="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLE" _
  15.         , "DB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"), Destination _
  16.         :=Range("A1"))
  17.         .CommandType = xlCmdTable
  18.         .CommandText = Array("select * from [Sheet1$] where ©m¦W='¦ó¤¯¼w'")
  19.         .Name = "¿z¿ï"
  20.         .FieldNames = True
  21.         .RowNumbers = False
  22.         .FillAdjacentFormulas = False
  23.         .PreserveFormatting = True
  24.         .RefreshOnFileOpen = False
  25.         .BackgroundQuery = True
  26.         .RefreshStyle = xlInsertDeleteCells
  27.         .SavePassword = False
  28.         .SaveData = True
  29.         .AdjustColumnWidth = True
  30.         .RefreshPeriod = 0
  31.         .PreserveColumnInfo = True
  32.         .SourceDataFile = "D:\¿z¿ï.xls"
  33.         .Refresh BackgroundQuery:=False
  34.     End With
  35. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD