ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open workbook(s) using VBA (https://www.excelbanter.com/excel-programming/447191-open-workbook-s-using-vba.html)

TIMOTHY

Open workbook(s) using VBA
 
Dear All

can you help me with the code of opening one or multiple workbook which are used daily

Thanks & Regards
Jeyakumar

isabelle

Open workbook(s) using VBA
 
hi Jeyakumar,

Sub test()
Dim Wk As Workbook, FD As FileDialog

Set FD = Application.FileDialog(msoFileDialogFilePicker)
FD.AllowMultiSelect = True
FD.Filters.Clear
FD.Filters.Add Description:="Excel Files", Extensions:="*.xls;*.xlsx"
FD.Show

If FD.SelectedItems.Count 0 Then
For i = 1 To FD.SelectedItems.Count
Application.Workbooks.Open FD.SelectedItems(i)
Next
End If

Set FD = Nothing
End Sub


--
isabelle


Le 2012-09-21 10:48, TIMOTHY a écrit :
Dear All

can you help me with the code of opening one or multiple workbook which are used daily

Thanks & Regards
Jeyakumar


TIMOTHY

Open workbook(s) using VBA
 
On Sep 22, 1:19*am, isabelle wrote:
hi Jeyakumar,

Sub test()
Dim Wk As Workbook, FD As FileDialog

Set FD = Application.FileDialog(msoFileDialogFilePicker)
FD.AllowMultiSelect = True
FD.Filters.Clear
FD.Filters.Add Description:="Excel Files", Extensions:="*.xls;*.xlsx"
FD.Show

If FD.SelectedItems.Count 0 Then
* *For i = 1 To FD.SelectedItems.Count
* * *Application.Workbooks.Open FD.SelectedItems(i)
* *Next
End If

Set FD = Nothing
End Sub

--
isabelle

Le 2012-09-21 10:48, TIMOTHY a écrit :



Dear All


can you help me with the code of opening one or multiple workbook which are used *daily


Thanks & Regards
Jeyakumar


thanks again for reply


All times are GMT +1. The time now is 03:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com