george hart
Board Regular
- Joined
- Dec 4, 2008
- Messages
- 241
The code below works fine when importing from my "O" drive, yet I need this now to point to files within my Lotus QuickR - I have the connector within my windows explorer . How would I change this to point to the Quickr server - current in library/QBR/xls etc?
I can't seem to find anything on this
Dim wbOpen As Workbook
Dim wbNew As Workbook
'Change Path
Const strPath As String = "O:\OPS\Operational Training Admin\QBR\Central Template\"
Dim strExtension As String
Application.ScreenUpdating = False
'On Error Resume Next
ChDrive strPath
ChDir strPath
'Change extension
strExtension = Dir("QBR*.xls")
Do While strExtension <> ""
Set wbOpen = Workbooks.Open(strPath & strExtension, UpdateLinks:=0)
With wbOpen
.Sheets.Copy After:=ThisWorkbook.Sheets(2)
'wbNew.Sheets(wbNew.Sheets.Count).Name = wbNew.Sheets(wbNew.Sheets.Count).Cells(1, 1)
.Close SaveChanges:=False
End With
strExtension = Dir
Loop
Application.ScreenUpdating = True
On Error GoTo 0
End Sub
Many thanks in advance
I can't seem to find anything on this
Dim wbOpen As Workbook
Dim wbNew As Workbook
'Change Path
Const strPath As String = "O:\OPS\Operational Training Admin\QBR\Central Template\"
Dim strExtension As String
Application.ScreenUpdating = False
'On Error Resume Next
ChDrive strPath
ChDir strPath
'Change extension
strExtension = Dir("QBR*.xls")
Do While strExtension <> ""
Set wbOpen = Workbooks.Open(strPath & strExtension, UpdateLinks:=0)
With wbOpen
.Sheets.Copy After:=ThisWorkbook.Sheets(2)
'wbNew.Sheets(wbNew.Sheets.Count).Name = wbNew.Sheets(wbNew.Sheets.Count).Cells(1, 1)
.Close SaveChanges:=False
End With
strExtension = Dir
Loop
Application.ScreenUpdating = True
On Error GoTo 0
End Sub
Many thanks in advance