Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would appreciate if anybody give me a solution on...
I have a macro that opens a text file into Excel 2000 thru. text import wizard. I want to fine tune it... like when I run the macro it should popup the "File Open" window and allow to select the text file to import from any drive/folder. Similarly after import process is over the macro should popup the window "Save as", so as to save at desired drive/folder. How to do this??? Thanks in Adv Shanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Shanks,
Dim sFile sFile = Application.GetOpenFilename("Text Files (*.txt), *.txt") If sFile < False Then Workbooks.OpenText Filename:=sFile, _ Origin:=xlWindows, _ StartRow:=1, _ DataType:=xlFixedWidth, _ FieldInfo:=Array(Array(0, 1), Array(10, 1), _ Array(21, 1), Array(52, 1), _ Array(62, 1), Array(105, 1), _ Array(117, 1), Array(135, 1), Array(157, 1)) 'do your bit sFile = Application.GetSaveAsFilename(, "Text Files (*.txt), *.txt") If sFile < False Then ActiveWorkbook.SaveAs Filename:=sFile End If End If -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) " wrote in message ... I would appreciate if anybody give me a solution on... I have a macro that opens a text file into Excel 2000 thru. text import wizard. I want to fine tune it... like when I run the macro it should popup the "File Open" window and allow to select the text file to import from any drive/folder. Similarly after import process is over the macro should popup the window "Save as", so as to save at desired drive/folder. How to do this??? Thanks in Adv Shanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Macro to Open File, Delete Contents, Save New File | Excel Discussion (Misc queries) | |||
Vista Office 2003 File Open Window @details will only show file n. | Excel Discussion (Misc queries) | |||
Open Another Workbook and Call Macro | Excel Programming | |||
Auto_Open vs Open and call macro --priority question | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |