View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rick Rick is offline
external usenet poster
 
Posts: 334
Default Common routines to open many files by name

I've started this code but it does not open the file. Can you help? BkNme is
loaded in a different routine.

Sub Wrkbk_Open(BkNme)
Dim WorkBk As Workbook
Dim WrkBk As String
Dim BKPath As String
BKPath = "C:\Documents and Settings\Richard L. Harig\My
Documents\Excell\Financials\"
WrkBk = BKPath & BkNme
On Error Resume Next
Set WorkBk = Workbooks(WrkBk)
If WorkBk Is Nothing Then
On Error GoTo Err0pn
Workbooks.Open Filename:=WorkBk, UpdateLinks:=3