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

[µo°Ý] excel vba ¥O¦s·sÀÉ°ÝÃD

[µo°Ý] excel vba ¥O¦s·sÀÉ°ÝÃD

¦U¦ì¤j­ô¦n
§Ú¸I¨ì¤U¦C°ÝÃD½Ð°Ý¬O§_­þ¼g¿ù,§Ú­n¥H¦s¦¨prnÃþ«¬ªºtxtÀÉ¡C
  1. Private Sub CommandButton1_Click()
  2.   Dim mypath, myfile, myback
  3.    Application.ScreenUpdating = False
  4.    Application.DisplayAlerts = False
  5.    mypath = "=D:\abc\bbb\LIST"
  6.    myfile = mypath & "\" & ThisWorkbook.Sheets("a").Cells(1, 9).Value & ".TXT"
  7.    Sheets("b").Select
  8.      ActiveWorkbook.SaveAs FileName:=myfile, FileFormat:=xlTextPrinter, CreateBackup:=False
  9.    Application.ScreenUpdating = True
  10.    Application.DisplayAlerts = True
  11. End Sub
½Æ»s¥N½X
aaa.JPG
·|¥X²{³o¿ù»~
lionliu

¦^´_ 1# lionliu
§Úªº³o¤@¤äexcel¬O¤@­Ó¥¼¦sÀɪºÀɮפ]´N¬O"¬¡­¶Ã¯1.xls"¡A¤£ª¾°ÝÃD¬O§_¥X¦b³o¡C
¦ý¬O¤S¥²¶·­n¦b³o¼ËÀô¹Ò¾Þ§@¡C
lionliu

TOP

¦^´_ 2# lionliu
mypath = "=D:\abc\bbb\LIST"  ¦h¤F =   
myfile = mypath & "\" & ThisWorkbook.Sheets("a").Cells(1, 9).Value & ".TXT"
.Sheets("a")        Àˬd¤u§@ªí¦WºÙ?
.Cells(1, 9).Value Àˬd¦³µL¤£²Å¦XÀɮשR¦Wªº¦r¦ê?
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# GBKEE
ÁÂÁÂGB¤j­ô´£¿ô¤w³B²z¦n¤F¡A±N=¸¹¥h±¼´N¥i¥H¤F
lionliu

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD