LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
LMI LMI is offline
external usenet poster
 
Posts: 9
Default How to open up 2 file in excel using macros

Below i have some code that will open up just a single excel file how can i
open up multiple file at a time?


Sub HB_ESG1()
Workbooks.OpenText FileName:= _
"P:\BIW_Qual\fits\BIW_FITS\HB_ESG1.TXT", Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False,
Comma:=True, _
Space:=False, Other:=False
Range("a1:cw20").Select
Selection.Copy
Windows("HB_ESG1.xls").Activate
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("Data ESG_HB").Select
Range("B3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("COMMANDS").Select
Windows("HB_ESG1.TXT").Activate
ActiveWindow.Close
End Sub

 
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
Macros - Open an access file from de Excel? Teresa Barrocas Excel Discussion (Misc queries) 1 November 3rd 09 12:53 PM
Open file with macros David T Excel Discussion (Misc queries) 2 November 29th 07 06:23 PM
Not allow to open file it do not accept macros JR_06062005[_2_] Excel Programming 1 February 15th 06 01:52 PM
Open file without macros John Excel Programming 4 July 21st 05 10:48 PM
In VBA, Open a file with macros disabled Otto Moehrbach[_6_] Excel Programming 1 October 24th 04 11:44 PM


All times are GMT +1. The time now is 06:24 AM.

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

About Us

"It's about Microsoft Excel"