Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have the following sub that works great for regular xls files. Now I need to use the similar sub but to open excel files that has macros. I am trying to open xls files without having the macro to proceed. Is there a way to do this by amending the following code? The purpose is to open files and then consolidate them into one. Thank you for your help. Sub openQuarterlyFiles() Dim selectedFile As String Dim wbToOpen As Integer, wsCount As Integer With objWsQBRfreeB lastline = Range("A32000").End(xlUp).Row For wbToOpen = 1 To 10 'display dialog asking user to select a file selectedFile = Application.GetOpenFilename( _ "Files (*.xls),*.xls", , "Select your Monthly Free Balance file", , False) 'check if cancel selected then open If selectedFile = "False" Then MsgBox "You choose to interrupt loading files." Call closeQBRFreeBalance Exit For Else Workbooks.OpenText fileName:=selectedFile Call openDelimitedFile(selectedFile) End If wsCount = Workbooks(1).Worksheets.count Workbooks(2).Activate Sheets(1).Move After:=Workbooks(1).Sheets(wsCount) Next End With processQfiles End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening files | Excel Discussion (Misc queries) | |||
show most recent files first when opening excel files | Excel Discussion (Misc queries) | |||
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 | Excel Discussion (Misc queries) | |||
How can I view files chronologically when opening multiple files | Excel Discussion (Misc queries) | |||
Opening Files | Excel Programming |