Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a file titled FP Skill by 15 min_12345678.XLS. Howeve each day
the _12345678 part of the file name changes. I wuold like to open that file and copy some cells out of it with a macro. The one below works fine if I have the excat name of the file in it, but I would like it to just open any file LIKE FP Skill by 15 min_*.XLS. The astrick does not work for me. Sub GetFPSkillby15() Workbooks.Open Filename:= _ "FP Skill by 15 min_*.XLS" Rows("1:65").Select Selection.Copy Windows("David of Chart Daily-FP 08-10-06.xls").Activate Range("A26").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Data Input").Select End Sub Any ideas. Both files are located in the same folder. David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub GetFPSkillby15()
sname = Dir("FP Skill by 15 Min_*.xls") Workbooks.Open Filename:= _ sName Rows("1:65").Select Selection.Copy Windows("David of Chart Daily-FP 08-10-06.xls").Activate Range("A26").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Data Input").Select End Sub -- Regards, Tom Ogilvy "gumby" wrote: I have a file titled FP Skill by 15 min_12345678.XLS. Howeve each day the _12345678 part of the file name changes. I wuold like to open that file and copy some cells out of it with a macro. The one below works fine if I have the excat name of the file in it, but I would like it to just open any file LIKE FP Skill by 15 min_*.XLS. The astrick does not work for me. Sub GetFPSkillby15() Workbooks.Open Filename:= _ "FP Skill by 15 min_*.XLS" Rows("1:65").Select Selection.Copy Windows("David of Chart Daily-FP 08-10-06.xls").Activate Range("A26").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Data Input").Select End Sub Any ideas. Both files are located in the same folder. David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you -
Tom Ogilvy wrote: Sub GetFPSkillby15() sname = Dir("FP Skill by 15 Min_*.xls") Workbooks.Open Filename:= _ sName Rows("1:65").Select Selection.Copy Windows("David of Chart Daily-FP 08-10-06.xls").Activate Range("A26").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Data Input").Select End Sub -- Regards, Tom Ogilvy "gumby" wrote: I have a file titled FP Skill by 15 min_12345678.XLS. Howeve each day the _12345678 part of the file name changes. I wuold like to open that file and copy some cells out of it with a macro. The one below works fine if I have the excat name of the file in it, but I would like it to just open any file LIKE FP Skill by 15 min_*.XLS. The astrick does not work for me. Sub GetFPSkillby15() Workbooks.Open Filename:= _ "FP Skill by 15 min_*.XLS" Rows("1:65").Select Selection.Copy Windows("David of Chart Daily-FP 08-10-06.xls").Activate Range("A26").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("Data Input").Select End Sub Any ideas. Both files are located in the same folder. David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy cells daily and automatically | Excel Worksheet Functions | |||
Auto save file copy with unique filename | Excel Worksheet Functions | |||
EXCEL FILE a copy/a copy/a copy ....filename | New Users to Excel | |||
Filename changes daily, anyway to link to most recent file | Excel Programming | |||
Macro to copy daily text file | Excel Programming |