ªð¦^¦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 : ¦¨¥\¬OÀuÂIªºµo´§¡A¥¢±Ñ¬O¯ÊÂIªº²Ö¿n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD