- ©«¤l
- 46
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 72
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2007-EXCEL
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-12-29
- ³Ì«áµn¿ý
- 2020-3-20
|
[µo°Ý] ½Ð°Ý~¦p¦ó±qACCESS§ì¨ú¸ê®Æ¦ÜEXCEL¤u§@ªí¦X¨Ö«á¡A¦A¶×¤JACCESS¸ê®Æ®w
¥»©«³Ì«á¥Ñ fusayloveme ©ó 2012-3-26 08:54 ½s¿è
¦U¦ì¤j¤j±z¦n¡A
¤p§Ì¥Ø«e¦³¨Ç°ÝÃD¡A·Q½Ð±Ð¤j®a¡A´N¬O»¡~Y§Ú·Q±qA¸ê®Æªí¤º(6ÓÄæ¦ì)§ì¨ú¸ê®Æ¦ÜEXCEL¡A¦ý¥L·|¶}°_¤»Ó¤u§@ªí¡A§Ú¦p¦ó±N¥L̦P®É©ñ¸m©ó¤@Ó¤u§@ªí
µM«á¥u¬OSHEET¤£¦P¡A¦ýSHEET¦WºÙ¶·¨Ì·Ó¨º6ÓÄæ¦ì¦WºÙ©O!? ¥H¤U§Ú¤w¦³¥ý¹Á¸Õ¼g¥X¤@¬q»yªk¡A§Ú¬O¥ý¥H¶}±Ò¨âÓ¸ê®Æªí¡AµM«á¥Î¿ý»sªº¤âªk¡A¦Aקï¤@¨Ç¡A
Y¶Ë²´¡A©êºp¤F.... ><"- Sub ¶}±Ò¸ê®Æªí()
- Dim mypath, myfile, mydata, X
- mypath = ThisWorkbook.Path
- myfile = "½d¨Ò¸ê®Æªí_ºô¸ô.accdb"
- ChDir mypath
- For i = 1 To 2
- X = "tb_23_HM" & i
- Workbooks.OpenDatabase Filename:=mypath & "\" & myfile, _
- CommandText:=Array(X), CommandType:=xlCmdTable, ImportDataAs:=xlTable
- Sheets("½d¨Ò¸ê®Æªí_ºô¸ô").Select
- Sheets("½d¨Ò¸ê®Æªí_ºô¸ô").Name = X
- Next
- Windows("Book2").Activate
- Sheets("tb_23_HM2").Select
- Sheets("tb_23_HM2").Move After:=Workbooks("Book1").Sheets(1)
- End Sub
½Æ»s¥N½X ±µ¤U¨Ó³oÃä§Ú´N¥d¦í¤F¡A´N¬O©O~±NB¸ê®Æªí¤ºªº¤»ÓÄæ¦ìªº¸ê®Æ¡A¦P¼Ë§ì¦ÜEXCEL»PA¸ê®Æªí¤ºªº¸ê®Æ¦X¨Ö¡A¨Ò¦p~A¸ê®Æªí¤ºªº[tb_23_HM1]¦³5µ§¸ê®Æ¶K¦ÜEXCEL¡A¨º§ÚB¸ê®Æªí¤ºªº[tb_23_HM1]¡A´N¬O±q²Ä6µ§¸ê®Æ¶}©l¶K¤W¡C³Ì«á´N¬O±N§t¦³AB¸ê®ÆªíªºEXCEL¶×¤JACCESS¤¤(·s¶}¤@ÓACCESS¸ê®Æ®w¡A¥i¯à¸û¬°«ê·í)¡C
³Ì«á¡A«Ü©êºp¤@³s¦ê°Ý¤F¨º»ò¦h°ÝÃD¡A¥ýÁÂÁ¤j®aÀ°¦£«ä¦Ò¸Ñ¨M°ÝÃD¡A¹w¯¬¤ß·Q¨Æ¦¨¡C ^_^
Á`µ²¤@¤U°ÝÃD¡G
1.±qACCESS¶}±Ò6Ó¸ê®Æªí(tb_23_HM1~tb_23_HM6)¡A¬Ý¯à¤£¯à°÷¦b¦P¤@ÓEXCEL¤º¶}±Ò??
2.¶}±Ò¸ê®Æªí«áªºsheet¡A¬O§_¯à°÷¨Ì·Ó¸ê®Æªí¦WºÙ©R¦W(tb_23_HM1~tb_23_HM6)©O??
3.¦A±NB¸ê®Æªí(tb_23_HM1~tb_23_HM6)¡A¶×¤Jèè¶}±Òªº¨ºÓEXCEL¡A¨Ã¤À§O¨Ì·Ósheet¤ÀÃþ¶×¤J¡A¦ý¬OÄÝ©ó±µÄò¤U¨Óªº¡A
¨Ò¦pa¸ê®Æ®wªºtb_23_HM1¶×¤J¦Üexcel¬O¨ì²Ä5µ§¡A±µ¤U¨Ób¸ê®Æ®wªºtb_23_HM1¡A¬O§_¥i±q²Ä6µ§¶}©l¶×¤J©O??
4.³Ì«á±N¾ã²z¦nªºexcel¸ê®Æ¡A¦b¨Ì·Ó¤£¦Pªºsheet¡A¶×¤J·sªºaccess¸ê®Æ®w¤º¡C
¦]¬°¤j·§¦³5~60Ó¸ê®Æªí¶·n§@¤@Ó¦X¨Ö¾ã²zªº°Ê§@...¨þ¨þ..¥ýÁÂÁ¤j®a¡C
¤U¸üª«¥ó¤º¦³~½d¨Ò¸ê®Æªí_ºô¸ô¬°A¸ê®Æªí¡A½d¨Ò¸ê®Æªí_®Ñ±¬°B¸ê®Æªí¡AEXCEL¤º§t§Ú©Ò¼gªºVBA¡AÁÂÁ¤j®a¡C
½d¨Ò¸ê®Æªí.rar (387.61 KB)
|
|