Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can't browze and open file, urgent!

Hi all!

I've a quick question with respect to the short macro shown below.

Sub importfile()
Application.DisplayAlerts = False
MyFile = Application.GetOpenFilename("text files,*.txt")
Workbooks.OpenText FileName:=MyFile, _
Origin:=xlWindows, StartRow:=1,
DataType:=xlFixedWidth, FieldInfo:= _
Array(Array(0, 1), Array(11, 1), Array(20, 1))
ActiveWindow.WindowState = xlNormal
Sheets("MyFinal").Select
Sheets("MyFinal").Move Befo=Workbooks
("vtec.xls").Sheets(1)
End Sub


The browsed and selected *.txt file is assigned to the variabl
"MyFile".
However, I am unable to move it before the existing workbook '
tec.xls' and it is giving me error. A small error in the line:

Sheets("MyFinal").Select
Sheets("MyFinal").Move Befo=Workbooks("vtec.xls").Sheets(1)

I would appreciate any tips.
Thanks alot guys.

Regds,

Arun.
Vtec Corp

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can't browze and open file, urgent!

See answer to 3rd posting of this question.

--
Regards,
Tom Ogilvy

"aiyer " wrote in message
...
Hi all!

I've a quick question with respect to the short macro shown below.

Sub importfile()
Application.DisplayAlerts = False
MyFile = Application.GetOpenFilename("text files,*.txt")
Workbooks.OpenText FileName:=MyFile, _
Origin:=xlWindows, StartRow:=1,
DataType:=xlFixedWidth, FieldInfo:= _
Array(Array(0, 1), Array(11, 1), Array(20, 1))
ActiveWindow.WindowState = xlNormal
Sheets("MyFinal").Select
Sheets("MyFinal").Move Befo=Workbooks
("vtec.xls").Sheets(1)
End Sub


The browsed and selected *.txt file is assigned to the variable
"MyFile".
However, I am unable to move it before the existing workbook 'V
tec.xls' and it is giving me error. A small error in the line:

Sheets("MyFinal").Select
Sheets("MyFinal").Move Befo=Workbooks("vtec.xls").Sheets(1)

I would appreciate any tips.
Thanks alot guys.

Regds,

Arun.
Vtec Corp.


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent: Free/Open Source alternative to MapPoint? Alan Rueckgauer Charts and Charting in Excel 0 September 25th 07 02:18 PM
Excel - Corrupt File / Urgent cpayne1757 Excel Discussion (Misc queries) 7 March 6th 07 03:20 AM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
URGENT!!!BIg FILE SIZE??? Dan in NY Excel Discussion (Misc queries) 0 February 17th 05 07:39 PM
Urgent info. on opening a mail merge with the datasource open Tonja[_2_] Excel Programming 0 December 18th 03 09:46 PM


All times are GMT +1. The time now is 01:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"