Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this for starters
Note This does not test to see if sheet name already exists You will also need to modify the Workbooks.OpenText statement to suit your needs Dim wsNew As Worksheets Set wsNew = Sheets.Add wsNew.Name = "D" & Day(Now()) Workbooks.OpenText FileName:="D:\My Documents\Book2.txt", _ Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, _ ConsecutiveDelimiter:=False, Tab:=True, _ Semicolon:=False, Comma:=False, _ Space:=False, Other:=False, FieldInfo:=Array(1, 1) ActiveWorkbook.Sheets(1).Cells.Copy Destination:=wsNew.Cells ActiveWorkbook.Close savechanges:=Fals -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to save and close, then copy file | Excel Discussion (Misc queries) | |||
copy cells daily and automatically | Excel Worksheet Functions | |||
Copy file with a macro | Excel Discussion (Misc queries) | |||
Using Macro to Save Copy of File to New Location | Excel Discussion (Misc queries) | |||
File Copy Macro | Excel Programming |